fix(lua): make vim.deepcopy work with vim.NIL

style: changed double quotes to single quotes

feat: add tests

fix tests
This commit is contained in:
Max
2022-11-14 20:26:27 +01:00
parent f8c6718277
commit e15f61b1bd
2 changed files with 9 additions and 0 deletions

View File

@@ -419,6 +419,12 @@ describe('lua stdlib', function()
return getmetatable(t2) == mt
]]))
ok(exec_lua([[
local t1 = {a = vim.NIL}
local t2 = vim.deepcopy(t1)
return t2.a == vim.NIL
]]))
matches('Cannot deepcopy object of type thread',
pcall_err(exec_lua, [[
local thread = coroutine.create(function () return 0 end)