Skip to content

Commit 5254482

Browse files
committed
fix: rotate_spec not correctly asserting
fixes #494
1 parent 6aeb98d commit 5254482

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/plenary/rotate_spec.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
local rotate = require("plenary.vararg").rotate
22

3-
local eq = vim.deep_equal
3+
local eq = function(a, b)
4+
assert.is["true"](vim.deep_equal(a, b), true)
5+
end
46

57
describe("rotate", function()
68
it("should rotate varargs", function()
7-
eq({ rotate(1, 2, 3) }, { 2, 3, 1 })
8-
eq({ rotate(1, 2, 3, 4, 5, 6, 7, 8, 9) }, { 2, 3, 4, 5, 6, 7, 8, 9, 1 })
9+
eq({ rotate(3, 1, 2, 3) }, { 2, 3, 1 })
10+
eq({ rotate(9, 1, 2, 3, 4, 5, 6, 7, 8, 9) }, { 2, 3, 4, 5, 6, 7, 8, 9, 1 })
911
end)
1012

1113
it("should rotate none", function()
1214
eq({ rotate() }, {})
1315
end)
1416

1517
it("should rotate one", function()
16-
eq({ rotate(1) }, { 1 })
18+
eq({ rotate(1, 1) }, { 1 })
1719
end)
1820
end)

0 commit comments

Comments
 (0)