diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2015-06-30 14:11:44 +0200 |
---|---|---|
committer | Lucas Hoffmann <l-m-h@web.de> | 2015-06-30 18:06:06 +0200 |
commit | 652ee0348cbbdfe4b1ecc7c3437ce4b45257254b (patch) | |
tree | fbe1175757265a7dbe2ab269b55573a718e48598 | |
parent | f0850775bfa39de99200a47e04a6e940650954ad (diff) | |
download | rneovim-652ee0348cbbdfe4b1ecc7c3437ce4b45257254b.tar.gz rneovim-652ee0348cbbdfe4b1ecc7c3437ce4b45257254b.tar.bz2 rneovim-652ee0348cbbdfe4b1ecc7c3437ce4b45257254b.zip |
tests: Use write_file() in source().
-rw-r--r-- | test/functional/helpers.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index db2122565b..33d04616a0 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -217,10 +217,7 @@ end local function source(code) local tmpname = os.tmpname() - local tmpfile = io.open(tmpname, "w") - tmpfile:write(code) - tmpfile:flush() - tmpfile:close() + write_file(tmpname, code) nvim_command('source '..tmpname) os.remove(tmpname) end |