aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_util.lua
diff options
context:
space:
mode:
authorSteven Arcangeli <506791+stevearc@users.noreply.github.com>2023-12-26 06:38:00 -0800
committerGitHub <noreply@github.com>2023-12-26 06:38:00 -0800
commitf245cca8ad42c9d344b53a18c3fc1a3c6724c2d4 (patch)
tree71cf24c9888024ce02706e3d1e544187729dcf09 /tests/test_util.lua
parent7396fc0208539e2bd70e3e446f27529e28dba12b (diff)
fix(injected): handle inline injections (#251)
Diffstat (limited to 'tests/test_util.lua')
-rw-r--r--tests/test_util.lua15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/test_util.lua b/tests/test_util.lua
index cded23a..7e13238 100644
--- a/tests/test_util.lua
+++ b/tests/test_util.lua
@@ -3,8 +3,6 @@ local conform = require("conform")
local log = require("conform.log")
local M = {}
-local OUTPUT_FILE = "tests/fake_formatter_output"
-
M.reset_editor = function()
vim.cmd.tabonly({ mods = { silent = true } })
for i, winid in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
@@ -19,21 +17,8 @@ M.reset_editor = function()
conform.formatters = {}
conform.formatters_by_ft = {}
pcall(vim.api.nvim_del_augroup_by_name, "Conform")
- if vim.fn.filereadable(OUTPUT_FILE) == 1 then
- vim.fn.delete(OUTPUT_FILE)
- end
log.level = vim.log.levels.ERROR
log.set_handler(print)
end
----@param lines string[]
-M.set_formatter_output = function(lines)
- local content = table.concat(lines, "\n")
- local fd = assert(vim.loop.fs_open(OUTPUT_FILE, "w", 420)) -- 0644
- vim.loop.fs_write(fd, content)
- -- Make sure we add the final newline
- vim.loop.fs_write(fd, "\n")
- vim.loop.fs_close(fd)
-end
-
return M