mirror of
https://github.com/TangentFoxy/lume.git
synced 2024-11-19 07:04:24 +00:00
Added tests for lume.remove()/lume.push() return values
This commit is contained in:
parent
abecb5b718
commit
f27b15f9a2
@ -115,6 +115,9 @@ tests["lume.push"] = function()
|
||||
testeq(t, { 1, 2, 3, 4, 5, 6, 7 })
|
||||
lume.push(t)
|
||||
testeq(t, { 1, 2, 3, 4, 5, 6, 7 })
|
||||
local x, y = lume.push(t, 123, 456)
|
||||
testeq(x, 123)
|
||||
testeq(y, 456)
|
||||
end
|
||||
|
||||
-- lume.remove
|
||||
@ -127,6 +130,8 @@ tests["lume.remove"] = function()
|
||||
lume.remove(t, 5)
|
||||
testeq(t, { 2, 4 })
|
||||
local m = { a = 1, b = 2, c = 3 }
|
||||
local x = lume.remove(t, 123)
|
||||
testeq(x, 123)
|
||||
end
|
||||
|
||||
-- lume.clear
|
||||
|
Loading…
Reference in New Issue
Block a user