diff options
| author | ZyX <kp-pav@yandex.ru> | 2017-03-11 23:13:09 +0300 |
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2017-03-11 23:23:50 +0300 |
| commit | ec730daee9bbdc34e250dea3beb7c15e6e7927dc (patch) | |
| tree | 3c80093e4262d24050a3653d49dd1913b685616e /test/helpers.lua | |
| parent | ce12bda712bfe41ec606dc86604011e33690df3c (diff) | |
| download | rneovim-ec730daee9bbdc34e250dea3beb7c15e6e7927dc.tar.gz rneovim-ec730daee9bbdc34e250dea3beb7c15e6e7927dc.tar.bz2 rneovim-ec730daee9bbdc34e250dea3beb7c15e6e7927dc.zip | |
unittests: Do not use which, add data to paths.lua.in instead
Diffstat (limited to 'test/helpers.lua')
| -rw-r--r-- | test/helpers.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/helpers.lua b/test/helpers.lua index ecf90869c4..d3dca00385 100644 --- a/test/helpers.lua +++ b/test/helpers.lua @@ -216,8 +216,11 @@ 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) + if ret == '' then + return nil + else + return ret:sub(1, -2) + end end return { |
