diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-08-02 19:13:48 +0100 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-09-15 21:19:29 +0100 |
commit | 312c783d81544df7ab3342f4b3316ced931e89b8 (patch) | |
tree | ea23894ef5cca92793671df9c8e3be5fee73a6f0 /test/functional/eval/api_functions_spec.lua | |
parent | 10aa60e806c300cc7bd1f84e52b4b043d6fac537 (diff) | |
download | rneovim-312c783d81544df7ab3342f4b3316ced931e89b8.tar.gz rneovim-312c783d81544df7ab3342f4b3316ced931e89b8.tar.bz2 rneovim-312c783d81544df7ab3342f4b3316ced931e89b8.zip |
feat(api): convert Blobs to API strings
Note that these are not NUL-terminated; the API supports this.
Diffstat (limited to 'test/functional/eval/api_functions_spec.lua')
-rw-r--r-- | test/functional/eval/api_functions_spec.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/eval/api_functions_spec.lua b/test/functional/eval/api_functions_spec.lua index 7d09a652ba..d07e74d40e 100644 --- a/test/functional/eval/api_functions_spec.lua +++ b/test/functional/eval/api_functions_spec.lua @@ -155,4 +155,13 @@ describe('eval-API', function() pcall_err(command, "sandbox call nvim_input('ievil')")) eq({''}, meths.buf_get_lines(0, 0, -1, true)) end) + + it('converts blobs to API strings', function() + command('let g:v1 = nvim__id(0z68656c6c6f)') + command('let g:v2 = nvim__id(v:_null_blob)') + eq(1, eval('type(g:v1)')) + eq(1, eval('type(g:v2)')) + eq('hello', eval('g:v1')) + eq('', eval('g:v2')) + end) end) |