diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-02-02 19:02:58 +0000 |
commit | b255fa570d8b041e4c81e3454d51e06100c2fa4f (patch) | |
tree | d3b246b467500ca48067ed4a45d2fa53966cd9f1 /test/unit | |
parent | eeccad2ff1ae8892fe9e06d733a7b07a166eecb0 (diff) | |
parent | 0bd07bea095a8000cffa4f379c1fa53e009c1143 (diff) | |
download | rneovim-20230125_mix.tar.gz rneovim-20230125_mix.tar.bz2 rneovim-20230125_mix.zip |
Merge branch 'aucmd_textputpost' into 20230125_mix20230125_mix
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/eval/typval_spec.lua | 5 | ||||
-rw-r--r-- | test/unit/helpers.lua | 5 | ||||
-rw-r--r-- | test/unit/tui_spec.lua | 2 |
3 files changed, 4 insertions, 8 deletions
diff --git a/test/unit/eval/typval_spec.lua b/test/unit/eval/typval_spec.lua index 128625374e..825377813d 100644 --- a/test/unit/eval/typval_spec.lua +++ b/test/unit/eval/typval_spec.lua @@ -1677,7 +1677,7 @@ describe('typval.c', function() eq(nil, lib.tv_dict_find(nil, 'test', -1)) eq(nil, lib.tv_dict_find(nil, nil, 0)) end) - itp('works with NULL key', function() + itp('works with empty key', function() local lua_d = { ['']=0, t=1, @@ -1692,7 +1692,6 @@ describe('typval.c', function() alloc_log:check({}) local dis = dict_items(d) eq({0, '', dis['']}, {tv_dict_find(d, '', 0)}) - eq({0, '', dis['']}, {tv_dict_find(d, nil, 0)}) end) itp('works with len properly', function() local lua_d = { @@ -1911,8 +1910,6 @@ describe('typval.c', function() local d = dict(lua_d) eq(lua_d, dct2tbl(d)) eq({{type='fref', fref='tr'}, true}, - {tv_dict_get_callback(d, nil, 0)}) - eq({{type='fref', fref='tr'}, true}, {tv_dict_get_callback(d, '', -1)}) eq({{type='none'}, true}, {tv_dict_get_callback(d, 'x', -1)}) diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index 14d8eda357..686af3b461 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -75,7 +75,8 @@ local function child_cleanup_once(func, ...) end end -local libnvim = nil +-- Unittests are run from debug nvim binary in lua interpreter mode. +local libnvim = ffi.C local lib = setmetatable({}, { __index = only_separate(function(_, idx) @@ -87,8 +88,6 @@ local lib = setmetatable({}, { }) local init = only_separate(function() - -- load neovim shared library - libnvim = ffi.load(Paths.test_libnvim_path) for _, c in ipairs(child_calls_init) do c.func(unpack(c.args)) end diff --git a/test/unit/tui_spec.lua b/test/unit/tui_spec.lua index 25b70a17c2..192e35a485 100644 --- a/test/unit/tui_spec.lua +++ b/test/unit/tui_spec.lua @@ -12,7 +12,7 @@ local multiqueue = cimport("./test/unit/fixtures/multiqueue.h") local ui_client = cimport("./src/nvim/ui_client.h") itp('handle_background_color', function() - local handle_background_color = cinput.ut_handle_background_color + local handle_background_color = cinput.handle_background_color local term_input = ffi.new('TermInput', {}) local events = globals.main_loop.thread_events local kIncomplete = cinput.kIncomplete |