test(struct_tags): add remove test
This commit is contained in:
parent
effd7e4b3d
commit
7a8fd2e273
2 changed files with 19 additions and 7 deletions
|
|
@ -10,7 +10,7 @@ local T = MiniTest.new_set {
|
|||
},
|
||||
}
|
||||
T["struct_tags"] = MiniTest.new_set {}
|
||||
T["struct_tags"][".add"] = function()
|
||||
T["struct_tags"]["add"] = function()
|
||||
local tmp = t.tmpfile()
|
||||
local fixtures = t.fixtures.read "tags/add"
|
||||
t.fixtures.write(tmp, fixtures.input)
|
||||
|
|
@ -22,4 +22,16 @@ T["struct_tags"][".add"] = function()
|
|||
t.eq(t.readfile(tmp), fixtures.output)
|
||||
end
|
||||
|
||||
T["struct_tags"]["remove"] = function()
|
||||
local tmp = t.tmpfile()
|
||||
local fixtures = t.fixtures.read "tags/remove"
|
||||
t.fixtures.write(tmp, fixtures.input)
|
||||
|
||||
child.cmd("silent edit " .. tmp)
|
||||
child.fn.setpos(".", { child.fn.bufnr "%", 4, 6, 0 })
|
||||
child.cmd "GoTagRm json"
|
||||
|
||||
t.eq(t.readfile(tmp), fixtures.output)
|
||||
end
|
||||
|
||||
return T
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue