aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/basic.lua b/tests/basic.lua
index 8522895..59b5940 100644
--- a/tests/basic.lua
+++ b/tests/basic.lua
@@ -15,7 +15,7 @@ local require_assert_result_1, require_assert_result_2 = require "assert" --
15print("require_assert_result:", require_assert_result_1, require_assert_result_2) 15print("require_assert_result:", require_assert_result_1, require_assert_result_2)
16 16
17local lanes_gen= assert(lanes.gen) 17local lanes_gen= assert(lanes.gen)
18local lanes_linda= assert(lanes.linda) 18local lanes_linda = assert(lanes.linda)
19 19
20local tostring= assert(tostring) 20local tostring= assert(tostring)
21 21
@@ -160,7 +160,7 @@ PRINT(" "..st)
160assert(st == "cancelled", "st is '" .. st .. "' instead of 'cancelled'") 160assert(st == "cancelled", "st is '" .. st .. "' instead of 'cancelled'")
161 161
162-- cancellation of lanes waiting on a linda 162-- cancellation of lanes waiting on a linda
163local limited = lanes.linda("limited") 163local limited = lanes_linda("limited")
164assert.fails(function() limited:limit("key", -1) end) 164assert.fails(function() limited:limit("key", -1) end)
165assert.failsnot(function() limited:limit("key", 1) end) 165assert.failsnot(function() limited:limit("key", 1) end)
166-- [[################################################ 166-- [[################################################
@@ -422,6 +422,7 @@ local function chunk2(linda)
422 -- 422 --
423 local info= debug.getinfo(1) -- 1 = us 423 local info= debug.getinfo(1) -- 1 = us
424 -- 424 --
425 PRINT("linda named-> '" ..tostring(linda).."'")
425 PRINT "debug.getinfo->" 426 PRINT "debug.getinfo->"
426 for k,v in pairs(info) do PRINT(k,v) end 427 for k,v in pairs(info) do PRINT(k,v) end
427 428
@@ -448,7 +449,7 @@ local function chunk2(linda)
448 linda:send("up", function() return ":)" end, "ok2") 449 linda:send("up", function() return ":)" end, "ok2")
449end 450end
450 451
451local linda= lanes.linda("linda") 452local linda = lanes_linda("auto")
452local t2= lanes_gen("debug,string,io", {gc_cb = gc_cb}, chunk2)(linda) -- prepare & launch 453local t2= lanes_gen("debug,string,io", {gc_cb = gc_cb}, chunk2)(linda) -- prepare & launch
453linda:send("down", function(linda) linda:send("up", "ready!") end, 454linda:send("down", function(linda) linda:send("up", "ready!") end,
454 "ok") 455 "ok")