mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix(typval): don't treat v:null as truthy (#23281)
This commit is contained in:
@@ -130,6 +130,12 @@ describe('Special values', function()
|
||||
eq("v:false", eval('"" . v:false'))
|
||||
end)
|
||||
|
||||
it('work with ?? (falsy operator)', function()
|
||||
eq(true, eval('v:true ?? 42'))
|
||||
eq(42, eval('v:false ?? 42'))
|
||||
eq(42, eval('v:null ?? 42'))
|
||||
end)
|
||||
|
||||
it('work with type()', function()
|
||||
eq(6, funcs.type(true))
|
||||
eq(6, funcs.type(false))
|
||||
|
||||
Reference in New Issue
Block a user