summaryrefslogtreecommitdiff
path: root/tests/modules/table/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-09 09:37:46 +0800
committerGitHub <[email protected]>2024-04-09 09:37:46 +0800
commitc729be0bb01b41b2cdc67f5b5713da239c9ea9a6 (patch)
tree0fde774547602aa4a9fd1ce3866c8cbed71f1854 /tests/modules/table/test.lua
parent15af62b0406caefc71ad7fa01c41f29a017759bb (diff)
parent19b67001ad77668b555a1213bc6d473bc35318aa (diff)
Merge pull request #4947 from xmake-io/runjobs
Improve runjobs
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 2b586e7a4..306d07eac 100644
--- a/tests/modules/table/test.lua
+++ b/tests/modules/table/test.lua
@@ -31,7 +31,7 @@ function test_unwrap(t)
end
function test_orderkeys(t)
- -- sort by modulo 2 then from the smallest to largest
+ -- sort by modulo 2 then from the smallest to largest
local f = function(a, b)
if a % 2 == 0 and b % 2 ~= 0 then
return true
@@ -40,7 +40,7 @@ function test_orderkeys(t)
end
return a < b
end
-
+
t:are_equal(table.orderkeys({[2] = 2, [1] = 1, [4] = 4, [3] = 3}, f), {2, 4, 1, 3})
t:are_equal(table.orderkeys({[1] = 1, [2] = 2, [3] = 3, [4] = 4}), {1, 2 , 3, 4})
end