|
|
|
@ -205,3 +205,17 @@ function test_late_install()
|
|
|
|
|
|
|
|
|
|
|
|
assert_true(i, "Listener was not called")
|
|
|
|
assert_true(i, "Listener was not called")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function test_verb_multicall_bug()
|
|
|
|
|
|
|
|
local var = 0
|
|
|
|
|
|
|
|
local bc1 = bc:init("a1", nil, {
|
|
|
|
|
|
|
|
["verb"] = function(bc, foo)
|
|
|
|
|
|
|
|
var = var + foo
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
local bc2 = bc:init("a2")
|
|
|
|
|
|
|
|
bc2:call_verb("verb", 1)
|
|
|
|
|
|
|
|
assert_equal(1, var, "Verb was not called correctly")
|
|
|
|
|
|
|
|
bc2:call_verb("verb", 2)
|
|
|
|
|
|
|
|
assert_equal(3, var, "Verb was not called correctly(Second attempt)")
|
|
|
|
|
|
|
|
end
|
|
|
|
|