diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2015-06-30 14:16:22 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2015-06-30 18:06:06 +0200 |
commit | 8f4e3a68a88a7c98afa3ff8c53e98d7ceb32fc15 (patch) | |
tree | a455ddee0b4f2632d007be78436cbd178a98da87 /test/functional/ex_cmds/wviminfo_spec.lua | |
parent | 652ee0348cbbdfe4b1ecc7c3437ce4b45257254b (diff) | |
download | rneovim-8f4e3a68a88a7c98afa3ff8c53e98d7ceb32fc15.tar.gz rneovim-8f4e3a68a88a7c98afa3ff8c53e98d7ceb32fc15.tar.bz2 rneovim-8f4e3a68a88a7c98afa3ff8c53e98d7ceb32fc15.zip |
tests: Use new write_file() function in tests.
Diffstat (limited to 'test/functional/ex_cmds/wviminfo_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/wviminfo_spec.lua | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/functional/ex_cmds/wviminfo_spec.lua b/test/functional/ex_cmds/wviminfo_spec.lua index 21176f1845..f4911cd3e8 100644 --- a/test/functional/ex_cmds/wviminfo_spec.lua +++ b/test/functional/ex_cmds/wviminfo_spec.lua @@ -1,7 +1,7 @@ local helpers, lfs = require('test.functional.helpers'), require('lfs') -local clear, execute, eq, neq, spawn, nvim_prog, set_session, wait = - helpers.clear, helpers.execute, helpers.eq, helpers.neq, helpers.spawn, - helpers.nvim_prog, helpers.set_session, helpers.wait +local clear, execute, eq, neq, spawn, nvim_prog, set_session, wait, write_file + = helpers.clear, helpers.execute, helpers.eq, helpers.neq, helpers.spawn, + helpers.nvim_prog, helpers.set_session, helpers.wait, helpers.write_file describe(':wviminfo', function() local viminfo_file = 'wviminfo_test' @@ -33,10 +33,7 @@ describe(':wviminfo', function() local text = 'wviminfo test' -- Create a dummy file - local fp = io.open(viminfo_file, 'w') - fp:write(text) - fp:flush() - fp:close() + write_file(viminfo_file, text) -- sanity check eq(text, io.open(viminfo_file):read()) |