From ac768996b295fe58256444a258911ec0fb9adc3f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 11 Feb 2025 07:19:46 -0800 Subject: refactor(tests): drop os_kill #32401 Also change job tests to use `nvim` instead of random programs like `ping`. --- test/functional/vimscript/system_spec.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/functional/vimscript') diff --git a/test/functional/vimscript/system_spec.lua b/test/functional/vimscript/system_spec.lua index b5c4972d7b..2813128aae 100644 --- a/test/functional/vimscript/system_spec.lua +++ b/test/functional/vimscript/system_spec.lua @@ -12,7 +12,6 @@ local command = n.command local insert = n.insert local expect = n.expect local exc_exec = n.exc_exec -local os_kill = n.os_kill local pcall_err = t.pcall_err local is_os = t.is_os @@ -394,7 +393,7 @@ describe('system()', function() it("with a program that doesn't close stdout will exit properly after passing input", function() local out = eval(string.format("system('%s', 'clip-data')", testprg('streams-test'))) assert(out:sub(0, 5) == 'pid: ', out) - os_kill(out:match('%d+')) + eq(0, vim.uv.kill(assert(tonumber(out:match('%d+'))), 'sigkill')) end) end) @@ -538,7 +537,7 @@ describe('systemlist()', function() it("with a program that doesn't close stdout will exit properly after passing input", function() local out = eval(string.format("systemlist('%s', 'clip-data')", testprg('streams-test'))) assert(out[1]:sub(0, 5) == 'pid: ', out) - os_kill(out[1]:match('%d+')) + eq(0, vim.uv.kill(assert(tonumber(out[1]:match('%d+'))), 'sigkill')) end) it('powershell w/ UTF-8 text #13713', function() -- cgit