diff options
author | Michael Reed <Pyrohh@users.noreply.github.com> | 2015-07-06 04:07:23 -0400 |
---|---|---|
committer | Michael Reed <Pyrohh@users.noreply.github.com> | 2015-07-06 04:07:23 -0400 |
commit | 1b78ad1c4d1533fe3089b9744a5306616e562f3e (patch) | |
tree | 19a6e6c0de104ad0d88031e7d255c0c05d3da080 /test/functional/legacy/060_exists_and_has_functions_spec.lua | |
parent | deab194413af1475f8f4d8657500c1250521059e (diff) | |
parent | 8f4e3a68a88a7c98afa3ff8c53e98d7ceb32fc15 (diff) | |
download | rneovim-1b78ad1c4d1533fe3089b9744a5306616e562f3e.tar.gz rneovim-1b78ad1c4d1533fe3089b9744a5306616e562f3e.tar.bz2 rneovim-1b78ad1c4d1533fe3089b9744a5306616e562f3e.zip |
Merge pull request #2932 from lucc/helpers/write_file
[RDY] tests: Add write_file helper function
Reviewed-by: Florian Walch <florian@fwalch.com>
Reviewed-by: Michael Reed <m.reed@mykolab.com>
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 |