mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
tests: Use write_file() in source().
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user