aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-09-12 03:26:35 +0200
committerGitHub <noreply@github.com>2019-09-12 03:26:35 +0200
commit11fe132dd9c2e7d9613a24bf6f976557a924c3a2 (patch)
treedef7e46a9d42ada3d38b18a307f83ffad826918c /test/functional/helpers.lua
parent108763171f6d26c098422925e58df585c415324f (diff)
downloadrneovim-11fe132dd9c2e7d9613a24bf6f976557a924c3a2.tar.gz
rneovim-11fe132dd9c2e7d9613a24bf6f976557a924c3a2.tar.bz2
rneovim-11fe132dd9c2e7d9613a24bf6f976557a924c3a2.zip
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
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 131ce7ed0b..2cf81ed4d0 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -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)