test: add skip and fix paths

This commit is contained in:
Oleksandr Smirnov 2025-02-17 18:51:09 +02:00
parent e293180359
commit 69c51692e7
No known key found for this signature in database
2 changed files with 14 additions and 13 deletions

View file

@ -11,7 +11,7 @@ local T = MiniTest.new_set {
}
T["iferr"] = MiniTest.new_set {}
T["iferr"]["works"] = function()
local tmp = vim.env.HOME .. "/test.go"
local tmp = t.tmpfile()
local fixtures = t.fixtures.read "iferr/iferr"
t.fixtures.write(tmp, fixtures.input)

View file

@ -11,18 +11,19 @@ local T = MiniTest.new_set {
}
T["struct_tags"] = MiniTest.new_set {}
T["struct_tags"][".add"] = function()
t.eq(1, 1)
-- local tmp = vim.env.HOME .. "/test.go"
--
-- local fixtures = t.fixtures.read "tags/add"
-- t.fixtures.write(tmp, fixtures.input)
--
-- child.cmd("silent edit " .. tmp)
-- child.fn.setpos(".", { child.fn.bufnr "%", 3, 6, 0 })
-- child.cmd "GoTagAdd json"
-- child.cmd "write"
--
-- t.eq(t.readfile(tmp), fixtures.output)
MiniTest.skip()
local tmp = vim.env.HOME .. "/test.go"
local fixtures = t.fixtures.read "tags/add"
t.fixtures.write(tmp, fixtures.input)
child.cmd("silent edit " .. tmp)
child.fn.setpos(".", { child.fn.bufnr "%", 3, 6, 0 })
child.cmd "GoTagAdd json"
child.cmd "write"
t.eq(t.readfile(tmp), fixtures.output)
end
return T