projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 0.9->0.10 again
[prosody.git]
/
tests
/
test_util_multitable.lua
diff --git
a/tests/test_util_multitable.lua
b/tests/test_util_multitable.lua
index aa93fc8dd6b6a33e243e889b8a145616e162c68e..71a834505b37a13df37744608318b4209759fd18 100644
(file)
--- a/
tests/test_util_multitable.lua
+++ b/
tests/test_util_multitable.lua
@@
-1,7
+1,7
@@
--- Prosody IM
v0.3
--- Copyright (C) 2008-20
09
Matthew Wild
--- Copyright (C) 2008-20
09
Waqas Hussain
---
+-- Prosody IM
+-- Copyright (C) 2008-20
10
Matthew Wild
+-- Copyright (C) 2008-20
10
Waqas Hussain
+--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
@@
-32,7
+32,7
@@
function get(get, multitable)
should_have[item] = nil;
end
if next(should_have) then
should_have[item] = nil;
end
if next(should_have) then
- return false, "not-enough";
+ return false, "not-enough";
end
return true, "has-all";
end
end
return true, "has-all";
end
@@
-41,7
+41,7
@@
function get(get, multitable)
end
mt = multitable.new();
end
mt = multitable.new();
-
+
local trigger1, trigger2, trigger3 = {}, {}, {};
local item1, item2, item3 = {}, {}, {};
local trigger1, trigger2, trigger3 = {}, {}, {};
local item1, item2, item3 = {}, {}, {};
@@
-51,12
+51,12
@@
function get(get, multitable)
mt:add(1, 2, 3, item1);
assert_has_all("Has item1 for 1, 2, 3", mt:get(1, 2, 3), item1);
mt:add(1, 2, 3, item1);
assert_has_all("Has item1 for 1, 2, 3", mt:get(1, 2, 3), item1);
-
+
-- Doesn't support nil
--[[ mt:add(nil, item1);
mt:add(nil, item2);
mt:add(nil, item3);
-- Doesn't support nil
--[[ mt:add(nil, item1);
mt:add(nil, item2);
mt:add(nil, item3);
-
+
assert_has_all("Has all items with (nil)", mt:get(nil), item1, item2, item3);
]]
end
assert_has_all("Has all items with (nil)", mt:get(nil), item1, item2, item3);
]]
end