mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
unittests: Fix linter errors
This commit is contained in:
@@ -98,7 +98,6 @@ describe('vim_to_object', function()
|
|||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
}
|
}
|
||||||
local ffi=require'ffi'
|
|
||||||
local list = lua2typvalt(llist)
|
local list = lua2typvalt(llist)
|
||||||
eq(llist, typvalt2lua(list))
|
eq(llist, typvalt2lua(list))
|
||||||
eq({nil_value, {}}, obj2lua(api.vim_to_object(list)))
|
eq({nil_value, {}}, obj2lua(api.vim_to_object(list)))
|
||||||
|
@@ -62,16 +62,16 @@ local typvalt2lua
|
|||||||
local typvalt2lua_tab
|
local typvalt2lua_tab
|
||||||
|
|
||||||
typvalt2lua_tab = {
|
typvalt2lua_tab = {
|
||||||
[tonumber(eval.VAR_SPECIAL)] = function(t, processed)
|
[tonumber(eval.VAR_SPECIAL)] = function(t)
|
||||||
return special_tab[t.vval.v_special]
|
return special_tab[t.vval.v_special]
|
||||||
end,
|
end,
|
||||||
[tonumber(eval.VAR_NUMBER)] = function(t, processed)
|
[tonumber(eval.VAR_NUMBER)] = function(t)
|
||||||
return {[type_key]=int_type, value=tonumber(t.vval.v_number)}
|
return {[type_key]=int_type, value=tonumber(t.vval.v_number)}
|
||||||
end,
|
end,
|
||||||
[tonumber(eval.VAR_FLOAT)] = function(t, processed)
|
[tonumber(eval.VAR_FLOAT)] = function(t)
|
||||||
return tonumber(t.vval.v_float)
|
return tonumber(t.vval.v_float)
|
||||||
end,
|
end,
|
||||||
[tonumber(eval.VAR_STRING)] = function(t, processed)
|
[tonumber(eval.VAR_STRING)] = function(t)
|
||||||
local str = t.vval.v_string
|
local str = t.vval.v_string
|
||||||
if str == nil then
|
if str == nil then
|
||||||
return null_string
|
return null_string
|
||||||
@@ -117,7 +117,7 @@ typvalt2lua_tab = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
typvalt2lua = function(t, processed)
|
typvalt2lua = function(t, processed)
|
||||||
return ((typvalt2lua_tab[tonumber(t.v_type)] or function(t_inner, processed)
|
return ((typvalt2lua_tab[tonumber(t.v_type)] or function(t_inner)
|
||||||
assert(false, 'Converting ' .. tonumber(t_inner.v_type) .. ' was not implemented yet')
|
assert(false, 'Converting ' .. tonumber(t_inner.v_type) .. ' was not implemented yet')
|
||||||
end)(t, processed or {}))
|
end)(t, processed or {}))
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user