Mercurial > prosody-hg
comparison tests/test_util_multitable.lua @ 7516:f74ff35a4b03
Merge 0.10->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 23 Jul 2016 18:58:58 +0200 |
| parents | ef6505962351 |
| children |
comparison
equal
deleted
inserted
replaced
| 7510:8a0a50e8ef2d | 7516:f74ff35a4b03 |
|---|---|
| 25 else | 25 else |
| 26 assert_is_not(list and #list > 0, "No items, and no list"); | 26 assert_is_not(list and #list > 0, "No items, and no list"); |
| 27 return true, "has-all"; | 27 return true, "has-all"; |
| 28 end | 28 end |
| 29 for n=1,select('#', ...) do should_have[select(n, ...)] = true; end | 29 for n=1,select('#', ...) do should_have[select(n, ...)] = true; end |
| 30 for n, item in ipairs(list) do | 30 for _, item in ipairs(list) do |
| 31 if not should_have[item] then return false, "too-many"; end | 31 if not should_have[item] then return false, "too-many"; end |
| 32 should_have[item] = nil; | 32 should_have[item] = nil; |
| 33 end | 33 end |
| 34 if next(should_have) then | 34 if next(should_have) then |
| 35 return false, "not-enough"; | 35 return false, "not-enough"; |
