diff options
Diffstat (limited to 'test/functional/legacy/060_exists_and_has_functions_spec.lua')
-rw-r--r-- | test/functional/legacy/060_exists_and_has_functions_spec.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/functional/legacy/060_exists_and_has_functions_spec.lua b/test/functional/legacy/060_exists_and_has_functions_spec.lua index d30f83dc6d..c4d2b01522 100644 --- a/test/functional/legacy/060_exists_and_has_functions_spec.lua +++ b/test/functional/legacy/060_exists_and_has_functions_spec.lua @@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers') local feed, insert, source = helpers.feed, helpers.insert, helpers.source local clear, execute, expect = helpers.clear, helpers.execute, helpers.expect +local write_file = helpers.write_file local os = require('os') describe('exists() and has() functions', function() @@ -11,8 +12,7 @@ describe('exists() and has() functions', function() it('is working', function() -- Create a temporary script needed for the test. - local script = io.open('test60.vim', 'w') - script:write(helpers.dedent([=[ + write_file('test60.vim', [=[ " Vim script for exists() function test " Script-local variables are checked here @@ -110,9 +110,7 @@ describe('exists() and has() functions', function() echo "FAILED" endif unlet str - ]=])) - script:flush() - script:close() + ]=]) source([=[ " Add the special directory with test scripts to &rtp |