diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2015-12-13 00:21:11 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-12-13 00:21:11 -0500 |
commit | 1b6e7f9e39077b16626460b385734d2ef804b20c (patch) | |
tree | 15b2c277e48580d8da1aa17e544ec00cc0bef37c | |
parent | aca51f3d9314c70a4df0f15bcb84edd2dc127ff0 (diff) | |
download | rneovim-1b6e7f9e39077b16626460b385734d2ef804b20c.tar.gz rneovim-1b6e7f9e39077b16626460b385734d2ef804b20c.tar.bz2 rneovim-1b6e7f9e39077b16626460b385734d2ef804b20c.zip |
test: fixeol_spec: setup/teardown
Without this cleanup, test will fail if run multiple times.
-rw-r--r-- | test/functional/legacy/fixeol_spec.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/functional/legacy/fixeol_spec.lua b/test/functional/legacy/fixeol_spec.lua index 113d14f6ca..578178d707 100644 --- a/test/functional/legacy/fixeol_spec.lua +++ b/test/functional/legacy/fixeol_spec.lua @@ -5,7 +5,20 @@ local feed, insert, source = helpers.feed, helpers.insert, helpers.source local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect describe('fixeol', function() - setup(clear) + local function rmtestfiles() + os.remove('test.out') + os.remove('XXEol') + os.remove('XXNoEol') + os.remove('XXTestEol') + os.remove('XXTestNoEol') + end + setup(function() + clear() + rmtestfiles() + end) + teardown(function() + rmtestfiles() + end) it('is working', function() -- First write two test files – with and without trailing EOL. |