aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/mpack_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-01-03 03:05:22 -0800
committerGitHub <noreply@github.com>2024-01-03 03:05:22 -0800
commita064ed622927b4c5e30165abbe54db841359c71f (patch)
tree76973648e9ad684068457ff021b4d13281bfad84 /test/functional/lua/mpack_spec.lua
parentee2127363463b89ba9d5071babcb9bd16c4db691 (diff)
parent04f2f864e270e772c6326cefdf24947f0130e492 (diff)
downloadrneovim-a064ed622927b4c5e30165abbe54db841359c71f.tar.gz
rneovim-a064ed622927b4c5e30165abbe54db841359c71f.tar.bz2
rneovim-a064ed622927b4c5e30165abbe54db841359c71f.zip
Merge #26398 lintlua for test/ dir
Diffstat (limited to 'test/functional/lua/mpack_spec.lua')
-rw-r--r--test/functional/lua/mpack_spec.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/functional/lua/mpack_spec.lua b/test/functional/lua/mpack_spec.lua
index cc788ed8bb..0b6a6d60bd 100644
--- a/test/functional/lua/mpack_spec.lua
+++ b/test/functional/lua/mpack_spec.lua
@@ -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)