Mercurial Hosting > luan
view web/src/luan/modules/web/test.luan @ 321:7f7708e8fdd4
remove import statement
git-svn-id: https://luan-java.googlecode.com/svn/trunk@322 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Sun, 08 Feb 2015 07:26:20 +0000 |
parents | eb27e765affb |
children |
line wrap: on
line source
local Luan = require "luan:Luan" local assert = Luan.assert local Io = require "luan:Io" local Http = require "luan:web/Http" local function print(...) Io.print_to(Io.stderr,...) end function Io.schemes.site(path,loading) return Io.Uri( "luan:web"..path, loading ) end Http.init_for_test() Http.request.parameters.code = "require('luan:Io').print 'hi'" page = Http.get_page "/web_run" assert( page.trim() == "hi" ) Http.init_for_test() Http.request.parameters.cmd = "'ab'..'cd'" page = Http.get_page "/web_shell" assert( page.find "abcd" )