diff options
author | ZyX <kp-pav@yandex.ru> | 2016-06-24 17:38:33 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-06-24 17:38:33 +0300 |
commit | 142d00e8dacfee2aa78ca7a267736fbeff0b3c41 (patch) | |
tree | 93f6962b4d970b29d351a4eebf56fb6432d12ab7 /test/unit/eval/helpers.lua | |
parent | 7900e38a8fd9bfef841ea24af42b817509406da8 (diff) | |
download | rneovim-142d00e8dacfee2aa78ca7a267736fbeff0b3c41.tar.gz rneovim-142d00e8dacfee2aa78ca7a267736fbeff0b3c41.tar.bz2 rneovim-142d00e8dacfee2aa78ca7a267736fbeff0b3c41.zip |
unittests/*/helpers: Fix testlint errors
Diffstat (limited to 'test/unit/eval/helpers.lua')
-rw-r--r-- | test/unit/eval/helpers.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/unit/eval/helpers.lua b/test/unit/eval/helpers.lua index 49df3ca119..45fbf8da5c 100644 --- a/test/unit/eval/helpers.lua +++ b/test/unit/eval/helpers.lua @@ -52,7 +52,9 @@ local special_tab = { local lst2tbl local dct2tbl -local typvalt2lua_tab = { +local typvalt2lua_tab + +typvalt2lua_tab = { [tonumber(eval.VAR_SPECIAL)] = function(t) return special_tab[t.vval.v_special] end, @@ -63,7 +65,7 @@ local typvalt2lua_tab = { return tonumber(t.vval.v_float) end, [tonumber(eval.VAR_STRING)] = function(t) - str = t.vval.v_string + local str = t.vval.v_string if str == nil then return null_string else @@ -82,8 +84,8 @@ local typvalt2lua_tab = { } local typvalt2lua = function(t) - return ((typvalt2lua_tab[tonumber(t.v_type)] or function(t) - assert(false, 'Converting ' .. tonumber(t.v_type) .. ' was not implemented yet') + 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)) end @@ -105,8 +107,9 @@ lst2tbl = function(l) end dct2tbl = function(d) - local ret = {} + local ret = {d=d} assert(false, 'Converting dictionaries is not implemented yet') + return ret end local lua2typvalt @@ -119,7 +122,7 @@ local typvalt = function(typ, vval) end local lua2typvalt_type_tab = { - [int_type] = function(l, processed) + [int_type] = function(l, _) return typvalt(eval.VAR_NUMBER, {v_number=l.value}) end, [flt_type] = function(l, processed) |