mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
refactor: format test/*
This commit is contained in:
@@ -8,16 +8,22 @@ local exec_lua = helpers.exec_lua
|
||||
describe('lua vim.mpack', function()
|
||||
before_each(clear)
|
||||
it('encodes vim.NIL', function()
|
||||
eq({true, true, true, true}, exec_lua [[
|
||||
eq(
|
||||
{ true, true, true, true },
|
||||
exec_lua [[
|
||||
local var = vim.mpack.decode(vim.mpack.encode({33, vim.NIL, 77}))
|
||||
return {var[1]==33, var[2]==vim.NIL, var[3]==77, var[4]==nil}
|
||||
]])
|
||||
]]
|
||||
)
|
||||
end)
|
||||
|
||||
it('encodes vim.empty_dict()', function()
|
||||
eq({{{}, "foo", {}}, true, false}, exec_lua [[
|
||||
eq(
|
||||
{ { {}, 'foo', {} }, true, false },
|
||||
exec_lua [[
|
||||
local var = vim.mpack.decode(vim.mpack.encode({{}, "foo", vim.empty_dict()}))
|
||||
return {var, vim.tbl_islist(var[1]), vim.tbl_islist(var[3])}
|
||||
]])
|
||||
]]
|
||||
)
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user