diff options
Diffstat (limited to 'tests/modules/table/test.lua')
| -rw-r--r-- | tests/modules/table/test.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/modules/table/test.lua b/tests/modules/table/test.lua new file mode 100644 index 000000000..fc17fcb62 --- /dev/null +++ b/tests/modules/table/test.lua @@ -0,0 +1,4 @@ +function test_remove_if(t) + t:are_equal(table.remove_if({1, 2, 3, 4, 5, 6}, function (t, i, v) return (v % 2) == 0 end), {1, 3, 5}) + t:are_equal(table.remove_if({a = 1, b = 2, c = 3}, function (t, i, v) return (v % 2) == 0 end), {a = 1, c = 3}) +end |
