aboutsummaryrefslogtreecommitdiff
path: root/tests/func_is_string.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/func_is_string.lua')
-rw-r--r--tests/func_is_string.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/func_is_string.lua b/tests/func_is_string.lua
index 5de4c60..3c91603 100644
--- a/tests/func_is_string.lua
+++ b/tests/func_is_string.lua
@@ -21,16 +21,17 @@ end
21 21
22local options = {globals = { b = 666 }} 22local options = {globals = { b = 666 }}
23 23
24local gen1 = lanes.gen("*", { name = 'auto' }, "return true, dofile('fibonacci.lua')") 24local gen1 = lanes.gen("*", { name = 'auto' }, "return true, error('bob')")
25local gen2 = lanes.gen(options, { name = 'auto' }, "return b")
26 25
27fibLane = gen1() 26fibLane = gen1()
28lanes.sleep(0.1) 27lanes.sleep(0.1)
29print(fibLane, fibLane.status) 28print(fibLane, fibLane.status)
30local _status, _err = fibLane:join() 29local _r, _err, _stk = fibLane:join()
31print(_status, _err) 30assert(_r == nil, "got " .. tostring(_r) .. " " .. tostring(_err) .. " " .. tostring(_stk))
32 31
33retLane1, retLane2 = gen2(), gen2() 32local gen2 = lanes.gen(options, { name = 'auto' }, "return b")
33local retLane1, retLane2 = gen2(), gen2()
34 34
35print( retLane1[1], retLane2[1]) 35print( retLane1[1], retLane2[1])
36print "TEST OK" \ No newline at end of file 36assert(retLane1[1] == 666 and retLane2[1] == 666)
37print "TEST OK"