mirror of
https://github.com/neovim/neovim.git
synced 2025-09-14 15:28:17 +00:00
feat(decode_string): decode binary string with NULs to Blob
Strings that previously decoded into a msgpack special for representing BINs with NULs now convert to Blobs. It shouldn't be possible to decode into this special anymore after this change? Notably, Lua strings with NULs now convert to Blobs when passed to VimL.
This commit is contained in:
@@ -364,8 +364,7 @@ describe('msgpack*() functions', function()
|
||||
command('let dumped = ["\\xC4\\x01\\n"]')
|
||||
command('let parsed = msgpackparse(dumped)')
|
||||
command('let dumped2 = msgpackdump(parsed)')
|
||||
eq({{_TYPE={}, _VAL={'\n'}}}, eval('parsed'))
|
||||
eq(1, eval('parsed[0]._TYPE is v:msgpack_types.binary'))
|
||||
eq({'\000'}, eval('parsed'))
|
||||
eq(1, eval('dumped ==# dumped2'))
|
||||
end)
|
||||
|
||||
|
Reference in New Issue
Block a user