test: fixeol_spec: setup/teardown

Without this cleanup, test will fail if run multiple times.
This commit is contained in:
Justin M. Keyes 2015-12-13 00:21:11 -05:00
parent aca51f3d93
commit 1b6e7f9e39

View File

@ -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.