mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
fix(vim.json): properly treat luanil options as booleans (#28622)
Note: Upstream doesn't have this. It's an Nvim addition.
This commit is contained in:
@@ -32,6 +32,18 @@ describe('vim.json.decode()', function()
|
||||
baz = vim.NIL,
|
||||
foo = { a = 'b' },
|
||||
}, exec_lua([[return vim.json.decode(..., {})]], jsonstr))
|
||||
eq(
|
||||
{
|
||||
arr = { 1, 2, vim.NIL },
|
||||
bar = { 3, 7 },
|
||||
baz = vim.NIL,
|
||||
foo = { a = 'b' },
|
||||
},
|
||||
exec_lua(
|
||||
[[return vim.json.decode(..., { luanil = { array = false, object = false } })]],
|
||||
jsonstr
|
||||
)
|
||||
)
|
||||
eq({
|
||||
arr = { 1, 2, vim.NIL },
|
||||
bar = { 3, 7 },
|
||||
|
Reference in New Issue
Block a user