test/functional: clear the temp directory before each tempfile test

It's possible that the first test encounters a temp directory with files
in it, due to a previous test causing the first test to fail.  Instead,
let's clean up before and after the test to make sure the temp area is
pristine before and after the test.
This commit is contained in:
John Szakmeister
2016-05-06 20:53:53 -04:00
parent e91afdcda6
commit 69d1bc1a47

View File

@@ -5,6 +5,9 @@ local os = helpers.cimport './src/nvim/os/os.h'
local tempfile = helpers.cimport './src/nvim/fileio.h'
describe('tempfile related functions', function()
before_each(function()
tempfile.vim_deltempdir()
end)
after_each(function()
tempfile.vim_deltempdir()
end)