Comparison

tests/test_util_multitable.lua @ 7511:ef6505962351

test_util_multitable: remove unused one-letter loop variable [luacheck]
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 23 Jul 2016 18:21:21 +0800
parent 7472:8965ad0aed2c
comparison
equal deleted inserted replaced
7509:d4bd036e679b 7511:ef6505962351
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";