refactor(tests): use auto commands instead of putting it in each test

This commit is contained in:
Oleksandr Smirnov 2025-03-23 18:49:49 +02:00
parent 9d734f114d
commit c0297ac1d6
No known key found for this signature in database
3 changed files with 9 additions and 5 deletions

View file

@ -44,16 +44,12 @@ T["struct_tags"]["should add more than one tag"] = function()
--- with comma, like gomodifytags
child.cmd("silent edit " .. tmp)
child.lua "vim.treesitter.start()"
child.fn.setpos(".", { child.fn.bufnr(tmp), 3, 1 })
child.cmd "GoTagAdd test4,test5"
child.cmd "write"
-- without comma
child.cmd("silent edit " .. tmp)
child.lua "vim.treesitter.start()"
child.fn.setpos(".", { child.fn.bufnr(tmp), 3, 1 })
child.cmd "GoTagAdd test1 test2"
child.cmd "write"