diff options
Diffstat (limited to 'test/functional/legacy/031_close_commands_spec.lua')
-rw-r--r-- | test/functional/legacy/031_close_commands_spec.lua | 19 |
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) |