From 8f4e3a68a88a7c98afa3ff8c53e98d7ceb32fc15 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Tue, 30 Jun 2015 14:16:22 +0200 Subject: tests: Use new write_file() function in tests. --- test/functional/runtime/autoload/provider/python3_spec.lua | 6 ++---- test/functional/runtime/autoload/provider/python_spec.lua | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'test/functional/runtime') diff --git a/test/functional/runtime/autoload/provider/python3_spec.lua b/test/functional/runtime/autoload/provider/python3_spec.lua index 6e6ba96f81..43889b7b2a 100644 --- a/test/functional/runtime/autoload/provider/python3_spec.lua +++ b/test/functional/runtime/autoload/provider/python3_spec.lua @@ -11,7 +11,7 @@ end local helpers = require('test.functional.helpers') local eval, command, feed = helpers.eval, helpers.command, helpers.feed local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert -local expect = helpers.expect +local expect, write_file = helpers.expect, helpers.write_file describe('python3 commands and functions', function() @@ -46,9 +46,7 @@ describe('python3 commands and functions', function() it('py3file', function() local fname = 'py3file.py' - local F = io.open(fname, 'w') - F:write('vim.command("let set_by_py3file = 123")') - F:close() + write_file(fname, 'vim.command("let set_by_py3file = 123")') command('py3file py3file.py') eq(123, eval('g:set_by_py3file')) os.remove(fname) diff --git a/test/functional/runtime/autoload/provider/python_spec.lua b/test/functional/runtime/autoload/provider/python_spec.lua index 5398d668bf..e71a7a4309 100644 --- a/test/functional/runtime/autoload/provider/python_spec.lua +++ b/test/functional/runtime/autoload/provider/python_spec.lua @@ -11,7 +11,7 @@ end local helpers = require('test.functional.helpers') local eval, command, feed = helpers.eval, helpers.command, helpers.feed local eq, clear, insert = helpers.eq, helpers.clear, helpers.insert -local expect = helpers.expect +local expect, write_file = helpers.expect, helpers.write_file describe('python commands and functions', function() @@ -46,9 +46,7 @@ describe('python commands and functions', function() it('pyfile', function() local fname = 'pyfile.py' - local F = io.open(fname, 'w') - F:write('vim.command("let set_by_pyfile = 123")') - F:close() + write_file(fname, 'vim.command("let set_by_pyfile = 123")') command('pyfile pyfile.py') eq(123, eval('g:set_by_pyfile')) os.remove(fname) -- cgit