tests: fix system_spec when run with clipboard manager (#10956)

* tests: move os_kill to functional helpers

* tests: fix system_spec when run with clipboard manager

Replaces "xclip" with a dedicated helper program.

Fixes: https://github.com/neovim/neovim/issues/4900#issuecomment-501866842
This commit is contained in:
Daniel Hahler
2019-09-12 03:26:35 +02:00
committed by GitHub
parent 108763171f
commit 11fe132dd9
6 changed files with 54 additions and 36 deletions

View File

@@ -796,6 +796,13 @@ function module.add_builddir_to_rtp()
module.command(string.format([[set rtp+=%s/runtime]], module.test_build_dir))
end
-- Kill process with given pid
function module.os_kill(pid)
return os.execute((iswin()
and 'taskkill /f /t /pid '..pid..' > nul'
or 'kill -9 '..pid..' > /dev/null'))
end
module = global_helpers.tbl_extend('error', module, global_helpers)
return function(after_each)