diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-08-02 19:35:06 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-09-15 21:19:29 +0100 |
commit | 10aa60e806c300cc7bd1f84e52b4b043d6fac537 (patch) | |
tree | b57fac817affcae0a53d5a2e1fbe79266c0a17ec /test/functional/lua/luaeval_spec.lua | |
parent | bfeecd0b418cf03a974c57082f4fc647b90aef06 (diff) | |
download | rneovim-10aa60e806c300cc7bd1f84e52b4b043d6fac537.tar.gz rneovim-10aa60e806c300cc7bd1f84e52b4b043d6fac537.tar.bz2 rneovim-10aa60e806c300cc7bd1f84e52b4b043d6fac537.zip |
feat(nlua): convert Blobs to strings
Diffstat (limited to 'test/functional/lua/luaeval_spec.lua')
-rw-r--r-- | test/functional/lua/luaeval_spec.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/lua/luaeval_spec.lua b/test/functional/lua/luaeval_spec.lua index 8ef77faa0f..36f6d4025f 100644 --- a/test/functional/lua/luaeval_spec.lua +++ b/test/functional/lua/luaeval_spec.lua @@ -458,6 +458,9 @@ describe('v:lua', function() function mymod.crashy() nonexistent() end + function mymod.whatis(value) + return type(value) .. ": " .. tostring(value) + end function mymod.omni(findstart, base) if findstart == 1 then return 5 @@ -476,6 +479,8 @@ describe('v:lua', function() eq(true, exec_lua([[return _G.val == vim.NIL]])) eq(NIL, eval('v:lua.mymod.noisy("eval")')) eq("hey eval", meths.get_current_line()) + eq("string: abc", eval('v:lua.mymod.whatis(0z616263)')) + eq("string: ", eval('v:lua.mymod.whatis(v:_null_blob)')) eq("Vim:E5108: Error executing lua [string \"<nvim>\"]:0: attempt to call global 'nonexistent' (a nil value)", pcall_err(eval, 'v:lua.mymod.crashy()')) |