Mercurial Hosting > luan
view web/src/luan/modules/web/test.luan @ 293:a50e88d3547c
add Web_server.init();
add File.rename_to();
git-svn-id: https://luan-java.googlecode.com/svn/trunk@294 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 11 Dec 2014 01:44:38 +0000 |
parents | eb27e765affb |
children | 7f7708e8fdd4 |
line wrap: on
line source
import "luan:Io" import "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 = "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" )