summaryrefslogtreecommitdiff
path: root/tests/modules/table/test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modules/table/test.lua')
-rw-r--r--tests/modules/table/test.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/modules/table/test.lua b/tests/modules/table/test.lua
index 297832575..2b586e7a4 100644
--- a/tests/modules/table/test.lua
+++ b/tests/modules/table/test.lua
@@ -33,9 +33,9 @@ end
function test_orderkeys(t)
-- sort by modulo 2 then from the smallest to largest
local f = function(a, b)
- if a % 2 == 0 then
+ if a % 2 == 0 and b % 2 ~= 0 then
return true
- elseif b % 2 == 0 then
+ elseif b % 2 == 0 and a % 2 ~= 0 then
return false
end
return a < b