mirror of
https://github.com/TangentFoxy/lume.git
synced 2025-07-28 02:52:21 +00:00
Added lume.remove() and tests
This commit is contained in:
@@ -117,6 +117,18 @@ tests["lume.push"] = function()
|
||||
testeq(t, { 1, 2, 3, 4, 5, 6, 7 })
|
||||
end
|
||||
|
||||
-- lume.remove
|
||||
tests["lume.remove"] = function()
|
||||
local t = { 1, 2, 3, 4, 5 }
|
||||
lume.remove(t, 3)
|
||||
testeq(t, { 1, 2, 4, 5 })
|
||||
lume.remove(t, 1)
|
||||
testeq(t, { 2, 4, 5 })
|
||||
lume.remove(t, 5)
|
||||
testeq(t, { 2, 4 })
|
||||
local m = { a = 1, b = 2, c = 3 }
|
||||
end
|
||||
|
||||
-- lume.shuffle
|
||||
tests["lume.shuffle"] = function()
|
||||
local t = {1, 2, 3, 4, 5}
|
||||
|
Reference in New Issue
Block a user