aboutsummaryrefslogtreecommitdiff
path: root/test/helpers.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-03-11 13:28:18 +0300
committerZyX <kp-pav@yandex.ru>2017-03-11 23:23:49 +0300
commit9400466282918396c814ef456d0f65dca51b8889 (patch)
tree5ef29efe2be5fa17afebc3e51215a7750e8ff671 /test/helpers.lua
parent12b062b2c862fd436cff0df4ebb2e5ca22e75e19 (diff)
downloadrneovim-9400466282918396c814ef456d0f65dca51b8889.tar.gz
rneovim-9400466282918396c814ef456d0f65dca51b8889.tar.bz2
rneovim-9400466282918396c814ef456d0f65dca51b8889.zip
unittests: Check core dumps in after_each, like in functests
Diffstat (limited to 'test/helpers.lua')
-rw-r--r--test/helpers.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/helpers.lua b/test/helpers.lua
index 25ab80bb50..ecf90869c4 100644
--- a/test/helpers.lua
+++ b/test/helpers.lua
@@ -212,6 +212,14 @@ local function check_cores(app)
end
end
+local function which(exe)
+ local pipe = io.popen('which ' .. exe, 'r')
+ local ret = pipe:read('*a')
+ pipe:close()
+ assert(ret:sub(-1) == '\n')
+ return ret:sub(1, -2)
+end
+
return {
eq = eq,
neq = neq,
@@ -224,4 +232,5 @@ return {
glob = glob,
check_cores = check_cores,
hasenv = hasenv,
+ which = which,
}