From 69c51692e74c09e93e5f160317b95cd6905e7077 Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Mon, 17 Feb 2025 18:51:09 +0200 Subject: [PATCH] test: add skip and fix paths --- spec/integration/iferr_test.lua | 2 +- spec/integration/struct_tags_test.lua | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/spec/integration/iferr_test.lua b/spec/integration/iferr_test.lua index f61e179..f8df3ea 100644 --- a/spec/integration/iferr_test.lua +++ b/spec/integration/iferr_test.lua @@ -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) diff --git a/spec/integration/struct_tags_test.lua b/spec/integration/struct_tags_test.lua index 6eebcf8..86c4174 100644 --- a/spec/integration/struct_tags_test.lua +++ b/spec/integration/struct_tags_test.lua @@ -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