diff scripts/test.luan @ 539:473e456444ff

Remove object-oriented primitive methods for string and binary
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 01 Jun 2015 17:53:55 -0600
parents 72610ddea6a7
children c5a93767cc5c
line wrap: on
line diff
--- a/scripts/test.luan	Mon Jun 01 00:51:44 2015 -0600
+++ b/scripts/test.luan	Mon Jun 01 17:53:55 2015 -0600
@@ -19,6 +19,8 @@
 
 local error = Luan.error
 local range = Luan.range
+local trim = String.trim
+local find = String.find
 local init = Http_test.init
 local get_page = Http_test.get_page
 local Ab_testing = require "luan:lucene/Ab_testing"
@@ -37,12 +39,12 @@
 init()
 Http.request.parameter.code = "require('luan:Io').print 'hi'"
 page = get_page "/run"
-page.trim() == "hi" or error "failed"
+trim(page) == "hi" or error "failed"
 
 init()
 Http.request.parameter.cmd = "'ab'..'cd'"
 page = get_page "/shell"
-page.find "abcd" or error "failed"
+find(page,"abcd") or error "failed"
 
 init()
 page = get_page "/dump"
@@ -107,12 +109,12 @@
 init()
 Http.request.parameter.name = "bob"
 page = get_page "/examples/hi2"
-page.find "bob" or error "failed"
+find(page,"bob") or error "failed"
 
 init()
 Http.request.parameter.name = "bob"
 page = get_page "/examples/hi2_simply_html"
-page.find "bob" or error "failed"
+find(page,"bob") or error "failed"
 
 
 print "done"