tests: Use write_file() in source().

This commit is contained in:
Lucas Hoffmann 2015-06-30 14:11:44 +02:00
parent f0850775bf
commit 652ee0348c

View File

@ -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