mirror of
https://github.com/TangentFoxy/lume.git
synced 2026-03-14 12:46:51 -06:00
Added tests for lume.remove()/lume.push() return values
This commit is contained in:
@@ -115,6 +115,9 @@ tests["lume.push"] = function()
|
|||||||
testeq(t, { 1, 2, 3, 4, 5, 6, 7 })
|
testeq(t, { 1, 2, 3, 4, 5, 6, 7 })
|
||||||
lume.push(t)
|
lume.push(t)
|
||||||
testeq(t, { 1, 2, 3, 4, 5, 6, 7 })
|
testeq(t, { 1, 2, 3, 4, 5, 6, 7 })
|
||||||
|
local x, y = lume.push(t, 123, 456)
|
||||||
|
testeq(x, 123)
|
||||||
|
testeq(y, 456)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- lume.remove
|
-- lume.remove
|
||||||
@@ -127,6 +130,8 @@ tests["lume.remove"] = function()
|
|||||||
lume.remove(t, 5)
|
lume.remove(t, 5)
|
||||||
testeq(t, { 2, 4 })
|
testeq(t, { 2, 4 })
|
||||||
local m = { a = 1, b = 2, c = 3 }
|
local m = { a = 1, b = 2, c = 3 }
|
||||||
|
local x = lume.remove(t, 123)
|
||||||
|
testeq(x, 123)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- lume.clear
|
-- lume.clear
|
||||||
|
|||||||
Reference in New Issue
Block a user