aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/031_close_commands_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-09-18 23:43:32 +0200
committerJustin M. Keyes <justinkz@gmail.com>2016-09-20 11:08:14 +0200
commit764f576d641fbc1f0608148d995a63847adb010e (patch)
treeb6afb1b05e0372d0ac01b69c0badda14323a91d0 /test/functional/legacy/031_close_commands_spec.lua
parentefe8311371830930b2ab14937b8d6adc801cc99b (diff)
downloadrneovim-764f576d641fbc1f0608148d995a63847adb010e.tar.gz
rneovim-764f576d641fbc1f0608148d995a63847adb010e.tar.bz2
rneovim-764f576d641fbc1f0608148d995a63847adb010e.zip
test/helpers.rmdir(): Retry once after a delay.
Attempt to avoid "Permission denied" on Windows potentially caused by open filepath handle in sibling process.
Diffstat (limited to 'test/functional/legacy/031_close_commands_spec.lua')
-rw-r--r--test/functional/legacy/031_close_commands_spec.lua19
1 files changed, 12 insertions, 7 deletions
diff --git a/test/functional/legacy/031_close_commands_spec.lua b/test/functional/legacy/031_close_commands_spec.lua
index eaf4e2982f..d41eadaa00 100644
--- a/test/functional/legacy/031_close_commands_spec.lua
+++ b/test/functional/legacy/031_close_commands_spec.lua
@@ -19,7 +19,18 @@ local expect = helpers.expect
local execute = helpers.execute
describe('Commands that close windows and/or buffers', function()
- setup(clear)
+ local function cleanup()
+ os.remove('Xtest1')
+ os.remove('Xtest2')
+ os.remove('Xtest3')
+ end
+ setup(function()
+ cleanup()
+ clear()
+ end)
+ teardown(function()
+ cleanup()
+ end)
it('is working', function()
insert('testtext')
@@ -112,10 +123,4 @@ describe('Commands that close windows and/or buffers', function()
" Now nvim should have exited
throw "Oh, Not finished yet."]])
end)
-
- teardown(function()
- os.remove('Xtest1')
- os.remove('Xtest2')
- os.remove('Xtest3')
- end)
end)