diff options
author | John Szakmeister <john@szakmeister.net> | 2016-05-06 20:53:53 -0400 |
---|---|---|
committer | John Szakmeister <john@szakmeister.net> | 2016-05-06 20:53:53 -0400 |
commit | 69d1bc1a474591e28c700193099e5c46968b1c78 (patch) | |
tree | f240a62247f74c3a53447f04c14843f8c6b6185f | |
parent | e91afdcda69b408b6f2572e82de3eb0ad4eee0b5 (diff) | |
download | rneovim-69d1bc1a474591e28c700193099e5c46968b1c78.tar.gz rneovim-69d1bc1a474591e28c700193099e5c46968b1c78.tar.bz2 rneovim-69d1bc1a474591e28c700193099e5c46968b1c78.zip |
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.
-rw-r--r-- | test/unit/tempfile_spec.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/tempfile_spec.lua b/test/unit/tempfile_spec.lua index b3e84db132..7975d11aed 100644 --- a/test/unit/tempfile_spec.lua +++ b/test/unit/tempfile_spec.lua @@ -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) |