mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
tests: Use write_file() in source().
This commit is contained in:
parent
f0850775bf
commit
652ee0348c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user