aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Hoffmann <l-m-h@web.de>2015-06-30 14:11:44 +0200
committerLucas Hoffmann <l-m-h@web.de>2015-06-30 18:06:06 +0200
commit652ee0348cbbdfe4b1ecc7c3437ce4b45257254b (patch)
treefbe1175757265a7dbe2ab269b55573a718e48598
parentf0850775bfa39de99200a47e04a6e940650954ad (diff)
downloadrneovim-652ee0348cbbdfe4b1ecc7c3437ce4b45257254b.tar.gz
rneovim-652ee0348cbbdfe4b1ecc7c3437ce4b45257254b.tar.bz2
rneovim-652ee0348cbbdfe4b1ecc7c3437ce4b45257254b.zip
tests: Use write_file() in source().
-rw-r--r--test/functional/helpers.lua5
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