From 1b6e7f9e39077b16626460b385734d2ef804b20c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 13 Dec 2015 00:21:11 -0500 Subject: test: fixeol_spec: setup/teardown Without this cleanup, test will fail if run multiple times. --- test/functional/legacy/fixeol_spec.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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. -- cgit