mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 01:38:16 +00:00
feat(api): convert Blobs to API strings
Note that these are not NUL-terminated; the API supports this.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user