Implement batch register
Signed-off-by: Rahix <rahix@rahix.de>
This commit is contained in:
parent
e8ec24dacc
commit
253e04ff5d
2 changed files with 20 additions and 1 deletions
|
|
@ -51,6 +51,20 @@ function test_register()
|
|||
end)
|
||||
end
|
||||
|
||||
function test_register_batch()
|
||||
local bc = BaseControl:new()
|
||||
bc:register{
|
||||
rb1=1234,
|
||||
rb2=4321,
|
||||
rb3v=function() end,
|
||||
}
|
||||
bc:finalize()
|
||||
|
||||
assert_true(bc:has_noun("rb1"))
|
||||
assert_true(bc:has_noun("rb2"))
|
||||
assert_true(bc:has_verb("rb3v"))
|
||||
end
|
||||
|
||||
function test_available()
|
||||
local bc = BaseControl:new()
|
||||
bc:register("available1", 1234)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue