diff options
author | ZyX <kp-pav@yandex.ru> | 2016-06-11 20:44:27 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2016-06-24 16:53:26 +0300 |
commit | 2968dc7bddbe56719bbb918f712de866fa6c230e (patch) | |
tree | da39820853d92b4339f0decac50eb1fe472ab46f /test/unit/api/helpers.lua | |
parent | 554005ea9ab7ae603ad59b69b920412524b13a45 (diff) | |
download | rneovim-2968dc7bddbe56719bbb918f712de866fa6c230e.tar.gz rneovim-2968dc7bddbe56719bbb918f712de866fa6c230e.tar.bz2 rneovim-2968dc7bddbe56719bbb918f712de866fa6c230e.zip |
fixup! unittests: Add tests for vim_to_object function
Diffstat (limited to 'test/unit/api/helpers.lua')
-rw-r--r-- | test/unit/api/helpers.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/api/helpers.lua b/test/unit/api/helpers.lua index 8ef133fd39..13964d3b9b 100644 --- a/test/unit/api/helpers.lua +++ b/test/unit/api/helpers.lua @@ -8,6 +8,7 @@ local ffi = helpers.ffi local list_type = eval_helpers.list_type local dict_type = eval_helpers.dict_type local func_type = eval_helpers.func_type +local nil_value = eval_helpers.nil_value local int_type = eval_helpers.int_type local flt_type = eval_helpers.flt_type local type_key = eval_helpers.type_key @@ -45,7 +46,7 @@ local obj2lua_tab = { end end, [tonumber(api.kObjectTypeNil)] = function(obj) - return NIL + return nil_value end, [tonumber(api.kObjectTypeFloat)] = function(obj) return tonumber(obj.data.floating) @@ -132,7 +133,7 @@ lua2obj = function(l) size=#l, data=eval.xmemdupz(to_cstr(l), #l), }}) - elseif l == nil or l == NIL then + elseif l == nil or l == nil_value then return obj(api.kObjectTypeNil, {integer=0}) end end @@ -143,6 +144,9 @@ return { func_type=func_type, int_type=int_type, flt_type=flt_type, + + nil_value=nil_value, + type_key=type_key, obj2lua=obj2lua, |