diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/api/private_helpers_spec.lua | 1 | ||||
-rw-r--r-- | test/unit/eval/helpers.lua | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/test/unit/api/private_helpers_spec.lua b/test/unit/api/private_helpers_spec.lua index e108d46370..8c54ea6a2a 100644 --- a/test/unit/api/private_helpers_spec.lua +++ b/test/unit/api/private_helpers_spec.lua @@ -98,7 +98,6 @@ describe('vim_to_object', function() }, {}, } - local ffi=require'ffi' local list = lua2typvalt(llist) eq(llist, typvalt2lua(list)) eq({nil_value, {}}, obj2lua(api.vim_to_object(list))) diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index 0656257361..712530a0aa 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -62,16 +62,16 @@ local typvalt2lua local typvalt2lua_tab typvalt2lua_tab = { - [tonumber(eval.VAR_SPECIAL)] = function(t, processed) + [tonumber(eval.VAR_SPECIAL)] = function(t) return special_tab[t.vval.v_special] 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)} end, - [tonumber(eval.VAR_FLOAT)] = function(t, processed) + [tonumber(eval.VAR_FLOAT)] = function(t) return tonumber(t.vval.v_float) end, - [tonumber(eval.VAR_STRING)] = function(t, processed) + [tonumber(eval.VAR_STRING)] = function(t) local str = t.vval.v_string if str == nil then return null_string @@ -117,7 +117,7 @@ typvalt2lua_tab = { } 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') end)(t, processed or {})) end |