aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2016-03-06 19:53:55 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2016-03-07 03:58:35 -0300
commit34a1bc1a46e66ecb0a4a871fbfa83e8d0d14dc25 (patch)
tree22b94e05573f9dacd8a085cbb1451d5f77eb0793 /test/functional/helpers.lua
parentc6ec148f2dfc837592d41720e5dc42bbe4e4eb78 (diff)
downloadrneovim-34a1bc1a46e66ecb0a4a871fbfa83e8d0d14dc25.tar.gz
rneovim-34a1bc1a46e66ecb0a4a871fbfa83e8d0d14dc25.tar.bz2
rneovim-34a1bc1a46e66ecb0a4a871fbfa83e8d0d14dc25.zip
Remove `goto` statement in lua code.
`goto` is another luajit extension not compatible with 5.1.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 0835981a02..55c97d451b 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -348,15 +348,13 @@ local function rmdir(path)
return nil
end
for file in lfs.dir(path) do
- if file == '.' or file == '..' then
- goto continue
- end
- local ret, err = os.remove(path..'/'..file)
- if not ret then
- error('os.remove: '..err)
- return nil
+ if file ~= '.' and file ~= '..' then
+ local ret, err = os.remove(path..'/'..file)
+ if not ret then
+ error('os.remove: '..err)
+ return nil
+ end
end
- ::continue::
end
local ret, err = os.remove(path)
if not ret then