|
|
|
@ -80,12 +80,16 @@ function test_multinode_listening()
|
|
|
|
i = false
|
|
|
|
i = false
|
|
|
|
bc1:listen_cancel("foo", id) -- Test wether cancelling works
|
|
|
|
bc1:listen_cancel("foo", id) -- Test wether cancelling works
|
|
|
|
local j = false
|
|
|
|
local j = false
|
|
|
|
bc2:listen_noun("foo", "onchange", nil, function(bc, foo)
|
|
|
|
local rid = bc2:listen_noun("foo", "onchange", nil, function(bc, foo)
|
|
|
|
j = true
|
|
|
|
j = true
|
|
|
|
end)
|
|
|
|
end)
|
|
|
|
bc1:set_noun("foo", 1234)
|
|
|
|
bc1:set_noun("foo", 1234)
|
|
|
|
assert_true(j, "Remote listening failed")
|
|
|
|
assert_true(j, "Remote listening failed")
|
|
|
|
assert_false(i, "Cancelling listener failed")
|
|
|
|
assert_false(i, "Cancelling local listener failed")
|
|
|
|
|
|
|
|
bc2:listen_cancel("foo", rid)
|
|
|
|
|
|
|
|
j = false
|
|
|
|
|
|
|
|
bc1:set_noun("foo", 34)
|
|
|
|
|
|
|
|
assert_false(j, "Cancelling remote listener failed")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function test_listen_modes()
|
|
|
|
function test_listen_modes()
|
|
|
|
|