diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-06-03 11:06:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-03 12:06:00 +0200 |
commit | 2db719f6c2b677fcbc197b02fe52764a851523b2 (patch) | |
tree | 648885f655ea6eea2d6b5ad9409bc18c3b49e0f7 /test | |
parent | c65e2203f70cd5d66fcb8ffb26f8cef38f50e04f (diff) | |
download | rneovim-2db719f6c2b677fcbc197b02fe52764a851523b2.tar.gz rneovim-2db719f6c2b677fcbc197b02fe52764a851523b2.tar.bz2 rneovim-2db719f6c2b677fcbc197b02fe52764a851523b2.zip |
feat(lua): rename vim.loop -> vim.uv (#22846)
Diffstat (limited to 'test')
-rw-r--r-- | test/benchmark/autocmd_spec.lua | 4 | ||||
-rw-r--r-- | test/benchmark/iter_spec.lua | 4 | ||||
-rw-r--r-- | test/benchmark/treesitter_spec.lua | 4 | ||||
-rw-r--r-- | test/busted_runner.lua | 2 | ||||
-rw-r--r-- | test/functional/core/startup_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/fixtures/fake-lsp-server.lua | 2 | ||||
-rw-r--r-- | test/functional/fixtures/start/nvim-leftpad/lua/async_leftpad.lua | 2 | ||||
-rw-r--r-- | test/functional/lua/highlight_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/lua/loop_spec.lua | 18 | ||||
-rw-r--r-- | test/functional/lua/overrides_spec.lua | 4 | ||||
-rw-r--r-- | test/functional/lua/thread_spec.lua | 42 | ||||
-rw-r--r-- | test/functional/lua/vim_spec.lua | 16 | ||||
-rw-r--r-- | test/functional/plugin/lsp/helpers.lua | 2 | ||||
-rw-r--r-- | test/functional/plugin/lsp_spec.lua | 36 | ||||
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 6 | ||||
-rw-r--r-- | test/functional/treesitter/parser_spec.lua | 4 |
16 files changed, 75 insertions, 75 deletions
diff --git a/test/benchmark/autocmd_spec.lua b/test/benchmark/autocmd_spec.lua index f243d9c94d..cd1af23640 100644 --- a/test/benchmark/autocmd_spec.lua +++ b/test/benchmark/autocmd_spec.lua @@ -12,10 +12,10 @@ describe('autocmd perf', function() exec_lua([[ out = {} function start() - ts = vim.loop.hrtime() + ts = vim.uv.hrtime() end function stop(name) - out[#out+1] = ('%14.6f ms - %s'):format((vim.loop.hrtime() - ts) / 1000000, name) + out[#out+1] = ('%14.6f ms - %s'):format((vim.uv.hrtime() - ts) / 1000000, name) end ]]) end) diff --git a/test/benchmark/iter_spec.lua b/test/benchmark/iter_spec.lua index 8d77054e83..d176079997 100644 --- a/test/benchmark/iter_spec.lua +++ b/test/benchmark/iter_spec.lua @@ -35,9 +35,9 @@ describe('vim.iter perf', function() local stats = {} local result for _ = 1, N do - local tic = vim.loop.hrtime() + local tic = vim.uv.hrtime() result = f(input) - local toc = vim.loop.hrtime() + local toc = vim.uv.hrtime() stats[#stats + 1] = (toc - tic) / 1000000 end table.sort(stats) diff --git a/test/benchmark/treesitter_spec.lua b/test/benchmark/treesitter_spec.lua index 5ce128c54a..6d82f5de8d 100644 --- a/test/benchmark/treesitter_spec.lua +++ b/test/benchmark/treesitter_spec.lua @@ -37,7 +37,7 @@ describe('treesitter perf', function() return "qq" .. acc .. "q" end - local start = vim.loop.hrtime() + local start = vim.uv.hrtime() keys(mk_keys(10)) for _ = 1, 100 do @@ -45,7 +45,7 @@ describe('treesitter perf', function() vim.cmd'redraw!' end - return vim.loop.hrtime() - start + return vim.uv.hrtime() - start ]] end) diff --git a/test/busted_runner.lua b/test/busted_runner.lua index 5604790069..d6864c6492 100644 --- a/test/busted_runner.lua +++ b/test/busted_runner.lua @@ -1,4 +1,4 @@ -local platform = vim.loop.os_uname() +local platform = vim.uv.os_uname() local deps_install_dir = os.getenv 'DEPS_INSTALL_DIR' local suffix = (platform and platform.sysname:lower():find'windows') and '.dll' or '.so' package.path = deps_install_dir.."/share/lua/5.1/?.lua;"..deps_install_dir.."/share/lua/5.1/?/init.lua;"..package.path diff --git a/test/functional/core/startup_spec.lua b/test/functional/core/startup_spec.lua index fe1b8e1c4e..54886d0c43 100644 --- a/test/functional/core/startup_spec.lua +++ b/test/functional/core/startup_spec.lua @@ -110,7 +110,7 @@ describe('startup', function() exec_lua [[ local asan_options = os.getenv 'ASAN_OPTIONS' if asan_options ~= nil and asan_options ~= '' then - vim.loop.os_setenv('ASAN_OPTIONS', asan_options..':detect_leaks=0') + vim.uv.os_setenv('ASAN_OPTIONS', asan_options..':detect_leaks=0') end ]] -- nvim -l foo.lua -arg1 -- a b c diff --git a/test/functional/fixtures/fake-lsp-server.lua b/test/functional/fixtures/fake-lsp-server.lua index 001cd5770a..dc0428afdc 100644 --- a/test/functional/fixtures/fake-lsp-server.lua +++ b/test/functional/fixtures/fake-lsp-server.lua @@ -950,7 +950,7 @@ local test_name = arg[1] local timeout = arg[2] assert(type(test_name) == 'string', 'test_name must be specified as first arg.') -local kill_timer = vim.loop.new_timer() +local kill_timer = vim.uv.new_timer() kill_timer:start(timeout or 1e3, 0, function() kill_timer:stop() kill_timer:close() diff --git a/test/functional/fixtures/start/nvim-leftpad/lua/async_leftpad.lua b/test/functional/fixtures/start/nvim-leftpad/lua/async_leftpad.lua index 45226ce24b..ffbd8a4f83 100644 --- a/test/functional/fixtures/start/nvim-leftpad/lua/async_leftpad.lua +++ b/test/functional/fixtures/start/nvim-leftpad/lua/async_leftpad.lua @@ -1,5 +1,5 @@ return function (val, res) local handle - handle = vim.loop.new_async(function() _G[res] = require'leftpad'(val) handle:close() end) + handle = vim.uv.new_async(function() _G[res] = require'leftpad'(val) handle:close() end) handle:send() end diff --git a/test/functional/lua/highlight_spec.lua b/test/functional/lua/highlight_spec.lua index 60d0ed5017..8e499f1e79 100644 --- a/test/functional/lua/highlight_spec.lua +++ b/test/functional/lua/highlight_spec.lua @@ -24,7 +24,7 @@ describe('vim.highlight.on_yank', function() it('does not close timer twice', function() exec_lua([[ vim.highlight.on_yank({timeout = 10, on_macro = true, event = {operator = "y"}}) - vim.loop.sleep(10) + vim.uv.sleep(10) vim.schedule(function() vim.highlight.on_yank({timeout = 0, on_macro = true, event = {operator = "y"}}) end) diff --git a/test/functional/lua/loop_spec.lua b/test/functional/lua/loop_spec.lua index 7f3787d7bf..c0924fa0c0 100644 --- a/test/functional/lua/loop_spec.lua +++ b/test/functional/lua/loop_spec.lua @@ -14,24 +14,24 @@ local retry = helpers.retry before_each(clear) -describe('vim.loop', function() +describe('vim.uv', function() it('version', function() - assert(funcs.luaeval('vim.loop.version()')>=72961, "libuv version too old") - matches("(%d+)%.(%d+)%.(%d+)", funcs.luaeval('vim.loop.version_string()')) + assert(funcs.luaeval('vim.uv.version()')>=72961, "libuv version too old") + matches("(%d+)%.(%d+)%.(%d+)", funcs.luaeval('vim.uv.version_string()')) end) it('timer', function() exec_lua('vim.api.nvim_set_var("coroutine_cnt", 0)', {}) local code=[[ - local loop = vim.loop + local uv = vim.uv local touch = 0 local function wait(ms) local this = coroutine.running() assert(this) - local timer = loop.new_timer() + local timer = uv.new_timer() timer:start(ms, 0, vim.schedule_wrap(function () timer:close() touch = touch + 1 @@ -73,7 +73,7 @@ describe('vim.loop', function() -- deferred API functions are disabled, as their safety can't be guaranteed exec_lua([[ - local timer = vim.loop.new_timer() + local timer = vim.uv.new_timer() timer:start(20, 0, function () _G.is_fast = vim.in_fast_event() timer:close() @@ -101,7 +101,7 @@ describe('vim.loop', function() -- callbacks can be scheduled to be executed in the main event loop -- where the entire API is available exec_lua([[ - local timer = vim.loop.new_timer() + local timer = vim.uv.new_timer() timer:start(20, 0, vim.schedule_wrap(function () _G.is_fast = vim.in_fast_event() timer:close() @@ -127,7 +127,7 @@ describe('vim.loop', function() -- fast (not deferred) API functions are allowed to be called directly exec_lua([[ - local timer = vim.loop.new_timer() + local timer = vim.uv.new_timer() timer:start(20, 0, function () timer:close() -- input is queued for processing after the callback returns @@ -151,6 +151,6 @@ describe('vim.loop', function() end) it("is equal to require('luv')", function() - eq(true, exec_lua("return vim.loop == require('luv')")) + eq(true, exec_lua("return vim.uv == require('luv')")) end) end) diff --git a/test/functional/lua/overrides_spec.lua b/test/functional/lua/overrides_spec.lua index 68e2525151..0fd8cb2f6a 100644 --- a/test/functional/lua/overrides_spec.lua +++ b/test/functional/lua/overrides_spec.lua @@ -119,7 +119,7 @@ describe('print', function() exec_lua([[ local cmd = ... function test() - local timer = vim.loop.new_timer() + local timer = vim.uv.new_timer() local done = false timer:start(10, 0, function() print("very fast") @@ -130,7 +130,7 @@ describe('print', function() -- loop until we know for sure the callback has been executed while not done do os.execute(cmd) - vim.loop.run("nowait") -- fake os_breakcheck() + vim.uv.run("nowait") -- fake os_breakcheck() end print("very slow") vim.api.nvim_command("sleep 1m") -- force deferred event processing diff --git a/test/functional/lua/thread_spec.lua b/test/functional/lua/thread_spec.lua index c7f2783cf3..e79d26a641 100644 --- a/test/functional/lua/thread_spec.lua +++ b/test/functional/lua/thread_spec.lua @@ -27,10 +27,10 @@ describe('thread', function() it('entry func is executed in protected mode', function() exec_lua [[ - local thread = vim.loop.new_thread(function() + local thread = vim.uv.new_thread(function() error('Error in thread entry func') end) - vim.loop.thread_join(thread) + vim.uv.thread_join(thread) ]] screen:expect([[ @@ -51,17 +51,17 @@ describe('thread', function() it('callback is executed in protected mode', function() exec_lua [[ - local thread = vim.loop.new_thread(function() - local timer = vim.loop.new_timer() + local thread = vim.uv.new_thread(function() + local timer = vim.uv.new_timer() local function ontimeout() timer:stop() timer:close() error('Error in thread callback') end timer:start(10, 0, ontimeout) - vim.loop.run() + vim.uv.run() end) - vim.loop.thread_join(thread) + vim.uv.thread_join(thread) ]] screen:expect([[ @@ -83,10 +83,10 @@ describe('thread', function() describe('print', function() it('works', function() exec_lua [[ - local thread = vim.loop.new_thread(function() + local thread = vim.uv.new_thread(function() print('print in thread') end) - vim.loop.thread_join(thread) + vim.uv.thread_join(thread) ]] screen:expect([[ @@ -105,10 +105,10 @@ describe('thread', function() it('vim.inspect', function() exec_lua [[ - local thread = vim.loop.new_thread(function() + local thread = vim.uv.new_thread(function() print(vim.inspect({1,2})) end) - vim.loop.thread_join(thread) + vim.uv.thread_join(thread) ]] screen:expect([[ @@ -140,13 +140,13 @@ describe('thread', function() function Thread_Test:do_test() local async local on_async = self.on_async - async = vim.loop.new_async(function(ret) + async = vim.uv.new_async(function(ret) on_async(ret) async:close() end) local thread = - vim.loop.new_thread(self.entry_func, async, self.entry_str, self.args) - vim.loop.thread_join(thread) + vim.uv.new_thread(self.entry_func, async, self.entry_str, self.args) + vim.uv.thread_join(thread) end Thread_Test.new = function(entry, on_async, ...) @@ -175,10 +175,10 @@ describe('thread', function() eq({'notification', 'result', {true}}, next_msg()) end) - it('loop', function() + it('uv', function() exec_lua [[ local entry = function(async) - async:send(vim.loop.version()) + async:send(vim.uv.version()) end local on_async = function(ret) vim.rpcnotify(1, ret) @@ -259,7 +259,7 @@ describe('threadpool', function() local after_work_fn = function(ret) vim.rpcnotify(1, 'result', ret) end - local work = vim.loop.new_work(work_fn, after_work_fn) + local work = vim.uv.new_work(work_fn, after_work_fn) work:queue() ]] @@ -268,7 +268,7 @@ describe('threadpool', function() it('with invalid argument', function() local status = pcall_err(exec_lua, [[ - local work = vim.loop.new_thread(function() end, function() end) + local work = vim.uv.new_thread(function() end, function() end) work:queue({}) ]]) @@ -288,7 +288,7 @@ describe('threadpool', function() }) exec_lua [[ - local work = vim.loop.new_work(function() return {} end, function() end) + local work = vim.uv.new_work(function() return {} end, function() end) work:queue() ]] @@ -319,7 +319,7 @@ describe('threadpool', function() function Threadpool_Test:do_test() local work = - vim.loop.new_work(self.work_fn, self.after_work) + vim.uv.new_work(self.work_fn, self.after_work) work:queue(self.work_fn_str, self.args) end @@ -334,10 +334,10 @@ describe('threadpool', function() ]] end) - it('loop', function() + it('uv', function() exec_lua [[ local work_fn = function() - return vim.loop.version() + return vim.uv.version() end local after_work_fn = function(ret) vim.rpcnotify(1, ret) diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 978a4fe0b6..55c03e21b3 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -882,7 +882,7 @@ describe('lua stdlib', function() it('vim.fn is allowed in "fast" context by some functions #18306', function() exec_lua([[ - local timer = vim.loop.new_timer() + local timer = vim.uv.new_timer() timer:start(0, 0, function() timer:close() assert(vim.in_fast_event()) @@ -948,7 +948,7 @@ describe('lua stdlib', function() }) screen:attach() exec_lua([[ - timer = vim.loop.new_timer() + timer = vim.uv.new_timer() timer:start(20, 0, function () -- notify ok (executed later when safe) vim.rpcnotify(chan, 'nvim_set_var', 'yy', {3, vim.NIL}) @@ -2481,7 +2481,7 @@ describe('lua stdlib', function() start_time = get_time() vim.g.timer_result = false - timer = vim.loop.new_timer() + timer = vim.uv.new_timer() timer:start(100, 0, vim.schedule_wrap(function() vim.g.timer_result = true end)) @@ -2503,7 +2503,7 @@ describe('lua stdlib', function() start_time = get_time() vim.g.timer_result = false - timer = vim.loop.new_timer() + timer = vim.uv.new_timer() timer:start(100, 0, vim.schedule_wrap(function() vim.g.timer_result = true end)) @@ -2546,17 +2546,17 @@ describe('lua stdlib', function() it('should allow waiting with no callback, explicit', function() eq(true, exec_lua [[ - local start_time = vim.loop.hrtime() + local start_time = vim.uv.hrtime() vim.wait(50, nil) - return vim.loop.hrtime() - start_time > 25000 + return vim.uv.hrtime() - start_time > 25000 ]]) end) it('should allow waiting with no callback, implicit', function() eq(true, exec_lua [[ - local start_time = vim.loop.hrtime() + local start_time = vim.uv.hrtime() vim.wait(50) - return vim.loop.hrtime() - start_time > 25000 + return vim.uv.hrtime() - start_time > 25000 ]]) end) diff --git a/test/functional/plugin/lsp/helpers.lua b/test/functional/plugin/lsp/helpers.lua index 86f7da0d2c..15e6a62781 100644 --- a/test/functional/plugin/lsp/helpers.lua +++ b/test/functional/plugin/lsp/helpers.lua @@ -99,7 +99,7 @@ local function fake_lsp_server_setup(test_name, timeout_ms, options, settings) end; }); workspace_folders = {{ - uri = 'file://' .. vim.loop.cwd(), + uri = 'file://' .. vim.uv.cwd(), name = 'test_folder', }}; on_init = function(client, result) diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index dac49345d0..26fd2276fd 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -65,7 +65,7 @@ describe('LSP', function() vim.v.progpath, '-l', fake_lsp_code, test_name; }; workspace_folders = {{ - uri = 'file://' .. vim.loop.cwd(), + uri = 'file://' .. vim.uv.cwd(), name = 'test_folder', }}; } @@ -2059,7 +2059,7 @@ describe('LSP', function() } } exec_lua('vim.lsp.util.apply_workspace_edit(...)', edit, 'utf-16') - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', tmpfile)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', tmpfile)) end) it('Supports file creation in folder that needs to be created with CreateFile payload', function() local tmpfile = helpers.tmpname() @@ -2075,7 +2075,7 @@ describe('LSP', function() } } exec_lua('vim.lsp.util.apply_workspace_edit(...)', edit, 'utf-16') - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', tmpfile)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', tmpfile)) end) it('createFile does not touch file if it exists and ignoreIfExists is set', function() local tmpfile = helpers.tmpname() @@ -2093,7 +2093,7 @@ describe('LSP', function() } } exec_lua('vim.lsp.util.apply_workspace_edit(...)', edit, 'utf-16') - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', tmpfile)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', tmpfile)) eq('Dummy content', read_file(tmpfile)) end) it('createFile overrides file if overwrite is set', function() @@ -2113,7 +2113,7 @@ describe('LSP', function() } } exec_lua('vim.lsp.util.apply_workspace_edit(...)', edit, 'utf-16') - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', tmpfile)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', tmpfile)) eq('', read_file(tmpfile)) end) it('DeleteFile delete file and buffer', function() @@ -2134,7 +2134,7 @@ describe('LSP', function() } } eq(true, pcall(exec_lua, 'vim.lsp.util.apply_workspace_edit(...)', edit, 'utf-16')) - eq(false, exec_lua('return vim.loop.fs_stat(...) ~= nil', tmpfile)) + eq(false, exec_lua('return vim.uv.fs_stat(...) ~= nil', tmpfile)) eq(false, exec_lua('return vim.api.nvim_buf_is_loaded(vim.fn.bufadd(...))', tmpfile)) end) it('DeleteFile fails if file does not exist and ignoreIfNotExists is false', function() @@ -2153,7 +2153,7 @@ describe('LSP', function() } } eq(false, pcall(exec_lua, 'vim.lsp.util.apply_workspace_edit(...)', edit)) - eq(false, exec_lua('return vim.loop.fs_stat(...) ~= nil', tmpfile)) + eq(false, exec_lua('return vim.uv.fs_stat(...) ~= nil', tmpfile)) end) end) @@ -2223,9 +2223,9 @@ describe('LSP', function() return vim.api.nvim_buf_get_lines(bufnr, 0, -1, true) ]], old, new) eq({'Test content'}, lines) - local exists = exec_lua('return vim.loop.fs_stat(...) ~= nil', old) + local exists = exec_lua('return vim.uv.fs_stat(...) ~= nil', old) eq(false, exists) - exists = exec_lua('return vim.loop.fs_stat(...) ~= nil', new) + exists = exec_lua('return vim.uv.fs_stat(...) ~= nil', new) eq(true, exists) os.remove(new) end) @@ -2266,9 +2266,9 @@ describe('LSP', function() return vim.fn.bufloaded(oldbufnr) ]], old_dir, new_dir, pathsep) eq(0, lines) - eq(false, exec_lua('return vim.loop.fs_stat(...) ~= nil', old_dir)) - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', new_dir)) - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', new_dir .. pathsep .. file)) + eq(false, exec_lua('return vim.uv.fs_stat(...) ~= nil', old_dir)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', new_dir)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', new_dir .. pathsep .. file)) eq('Test content', read_file(new_dir .. pathsep .. file)) os.remove(new_dir) @@ -2286,7 +2286,7 @@ describe('LSP', function() vim.lsp.util.rename(old, new, { ignoreIfExists = true }) ]], old, new) - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', old)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', old)) eq('New file', read_file(new)) exec_lua([[ @@ -2296,7 +2296,7 @@ describe('LSP', function() vim.lsp.util.rename(old, new, { overwrite = false }) ]], old, new) - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', old)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', old)) eq('New file', read_file(new)) end) it('Does override target if overwrite is true', function() @@ -2311,8 +2311,8 @@ describe('LSP', function() vim.lsp.util.rename(old, new, { overwrite = true }) ]], old, new) - eq(false, exec_lua('return vim.loop.fs_stat(...) ~= nil', old)) - eq(true, exec_lua('return vim.loop.fs_stat(...) ~= nil', new)) + eq(false, exec_lua('return vim.uv.fs_stat(...) ~= nil', old)) + eq(true, exec_lua('return vim.uv.fs_stat(...) ~= nil', new)) eq('Old file\n', read_file(new)) end) end) @@ -3697,7 +3697,7 @@ describe('LSP', function() describe('cmd', function() it('can connect to lsp server via rpc.connect', function() local result = exec_lua [[ - local uv = vim.loop + local uv = vim.uv local server = uv.new_tcp() local init = nil server:bind('127.0.0.1', 0) @@ -3725,7 +3725,7 @@ describe('LSP', function() describe('handlers', function() it('handler can return false as response', function() local result = exec_lua [[ - local uv = vim.loop + local uv = vim.uv local server = uv.new_tcp() local messages = {} local responses = {} diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 1b65c1cddc..7723b6c7e7 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -1554,7 +1554,7 @@ describe('TUI', function() end) it('no assert failure on deadly signal #21896', function() - exec_lua([[vim.loop.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]]) + exec_lua([[vim.uv.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]]) screen:expect({any = '%[Process exited 1%]'}) end) @@ -1605,7 +1605,7 @@ describe('TUI', function() foo | {3:-- TERMINAL --} | ]]) - exec_lua([[vim.loop.kill(vim.fn.jobpid(vim.bo.channel), 'sigwinch')]]) + exec_lua([[vim.uv.kill(vim.fn.jobpid(vim.bo.channel), 'sigwinch')]]) screen:expect([[ {1: } | {4:~ }| @@ -2517,7 +2517,7 @@ describe("TUI as a client", function() -- No heap-use-after-free when receiving UI events after deadly signal #22184 server:request('nvim_input', ('a'):rep(1000)) - exec_lua([[vim.loop.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]]) + exec_lua([[vim.uv.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]]) screen:expect({any = '%[Process exited 1%]'}) eq(0, meths.get_vvar('shell_error')) diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index 14de07639b..e463382d07 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -182,11 +182,11 @@ void ui_refresh(void) local function q(n) return exec_lua ([[ local query, n = ... - local before = vim.loop.hrtime() + local before = vim.uv.hrtime() for i=1,n,1 do cquery = vim.treesitter.query.parse("c", ...) end - local after = vim.loop.hrtime() + local after = vim.uv.hrtime() return after - before ]], long_query, n) end |