diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-11-14 22:26:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 22:26:22 +0100 |
commit | 4541c450812bb5252a63307772add143be1ee9c7 (patch) | |
tree | 15b8c595ede5b3504948f1eaf3e487a9d050684d /test/functional/lua/vim_spec.lua | |
parent | f8c671827710c6e9cca3bfd60c32098b2be8239a (diff) | |
parent | e15f61b1bd60f6a198a0d9969cea407784ff71d0 (diff) | |
download | rneovim-4541c450812bb5252a63307772add143be1ee9c7.tar.gz rneovim-4541c450812bb5252a63307772add143be1ee9c7.tar.bz2 rneovim-4541c450812bb5252a63307772add143be1ee9c7.zip |
Merge pull request #21054 from max397574/fix/deepcopy_vimNIL
fix(lua): make `vim.deepcopy` work with `vim.NIL`
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 6d0d87746c..21f2c19fbb 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -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) |