comparison scripts/test.luan @ 435:5b36f663a1b8

make members lower case
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 03 May 2015 21:28:49 -0600
parents cd2924a1052c
children 2b9bc97f0439
comparison
equal deleted inserted replaced
434:472fc70853cd 435:5b36f663a1b8
10 local function print(...) 10 local function print(...)
11 Io.print_to(Io.stderr,...) 11 Io.print_to(Io.stderr,...)
12 end 12 end
13 13
14 function Io.schemes.site(path) 14 function Io.schemes.site(path)
15 return Io.Uri( "luan:web"..path ) 15 return Io.uri( "luan:web"..path )
16 end 16 end
17 17
18 18
19 Http.init_for_test() 19 Http.init_for_test()
20 Http.request.parameters.code = "require('luan:Io').print 'hi'" 20 Http.request.parameters.code = "require('luan:Io').print 'hi'"
21 page = Http.get_page "/web_run" 21 page = Http.get_page "/run"
22 assert( page.trim() == "hi" ) 22 assert( page.trim() == "hi" )
23 23
24 Http.init_for_test() 24 Http.init_for_test()
25 Http.request.parameters.cmd = "'ab'..'cd'" 25 Http.request.parameters.cmd = "'ab'..'cd'"
26 page = Http.get_page "/web_shell" 26 page = Http.get_page "/shell"
27 assert( page.find "abcd" ) 27 assert( page.find "abcd" )
28 28
29 29
30 -- lucene 30 -- lucene
31 31
32 this_file = Io.schemes.file(Luan.arg[0]) 32 this_file = Io.schemes.file(Luan.arg[0])
33 this_dir = this_file.parent() 33 this_dir = this_file.parent()
34 lucene_dir = this_dir.parent().child("build").child("lucene_test") 34 lucene_dir = this_dir.parent().child("build").child("lucene_test")
35 --print(lucene_dir.to_string()) 35 --print(lucene_dir.to_string())
36 db = Lucene.Index(lucene_dir.to_string()) 36 db = Lucene.index(lucene_dir.to_string())
37 db.delete_all() 37 db.delete_all()
38 38
39 ab_testing = Ab_testing.of(db) 39 ab_testing = Ab_testing.of(db)
40 test_events = {"all"} 40 test_events = {"all"}
41 aggregator_factories = { 41 aggregator_factories = {