mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 09:10:04 +08:00
19 lines
422 B
Lua
Vendored
19 lines
422 B
Lua
Vendored
local rotate = require("plenary.vararg").rotate
|
|
|
|
local eq = vim.deep_equal
|
|
|
|
describe("rotate", function()
|
|
it("should rotate varargs", function()
|
|
eq({ rotate(1, 2, 3) }, { 2, 3, 1 })
|
|
eq({ rotate(1, 2, 3, 4, 5, 6, 7, 8, 9) }, { 2, 3, 4, 5, 6, 7, 8, 9, 1 })
|
|
end)
|
|
|
|
it("should rotate none", function()
|
|
eq({ rotate() }, {})
|
|
end)
|
|
|
|
it("should rotate one", function()
|
|
eq({ rotate(1) }, { 1 })
|
|
end)
|
|
end)
|