diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-09-20 03:02:48 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-09-20 11:08:14 +0200 |
commit | 13e57246216c946594862938a392e4b8fab4e8b4 (patch) | |
tree | 253eb6689936304db3fd1acc66b3e1072104ddf0 | |
parent | 764f576d641fbc1f0608148d995a63847adb010e (diff) | |
download | rneovim-13e57246216c946594862938a392e4b8fab4e8b4.tar.gz rneovim-13e57246216c946594862938a392e4b8fab4e8b4.tar.bz2 rneovim-13e57246216c946594862938a392e4b8fab4e8b4.zip |
test/helpers.rmdir(): lfs.rmdir() instead of os.remove()
os.remove() fails on empty directories in non-POSIX systems.
https://github.com/keplerproject/luafilesystem/issues/4
lfs.rmdir() "usually" works, so use it instead.
Closes #5236
-rw-r--r-- | test/functional/helpers.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 0fb168b736..d5b7442b57 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -424,15 +424,15 @@ local function do_rmdir(path) end end end - local ret, err = os.remove(path) + local ret, err = lfs.rmdir(path) if not ret then - error('os.remove: '..err) + error('lfs.rmdir('..path..'): '..err) end return ret end local function rmdir(path) - local ret, err = pcall(do_rmdir, path) + local ret, _ = pcall(do_rmdir, path) -- During teardown, the nvim process may not exit quickly enough, then rmdir() -- will fail (on Windows). if not ret then -- Try again. |