eval/typval: Allow NULL dict as tv_dict_get_callback() argument

Also removes NULL key input: tv_dict_find() does not allow this.
This commit is contained in:
ZyX
2017-03-26 03:42:23 +03:00
parent f4256243db
commit 58e34e8d99
2 changed files with 3 additions and 5 deletions

View File

@@ -1736,8 +1736,7 @@ describe('typval.c', function()
return cb_lua, ret
end
itp('works with NULL dict', function()
eq({{type='none'}, true},
{tv_dict_get_callback(nil, nil, 0)})
eq({{type='none'}, true}, {tv_dict_get_callback(nil, '')})
end)
itp('works', function()
local lua_d = {