feat(struct_tags): add range support (#117)

* feat(struct_tags): add range support

* refactor: use `start`, and `end_` naming for ranges
This commit is contained in:
Oleksandr Smirnov 2025-08-29 19:46:45 +03:00 committed by Oleksandr Smirnov
parent 8c87952964
commit b6d3815f9b
8 changed files with 129 additions and 26 deletions

View file

@ -78,4 +78,22 @@ struct_tags["should add tags on short declr var"] = function()
t.cleanup(rs)
end
struct_tags["should add tag with range"] = function()
local rs = t.setup_test("tags/add_range", child, { 5, 1 })
child.cmd ".,+2GoTagAdd gopher"
child.cmd "write"
t.eq(t.readfile(rs.tmp), rs.fixtures.output)
t.cleanup(rs)
end
struct_tags["should remove tag with range"] = function()
local rs = t.setup_test("tags/remove_range", child, { 6, 1 })
child.cmd ".,+2GoTagRm asdf"
child.cmd "write"
t.eq(t.readfile(rs.tmp), rs.fixtures.output)
t.cleanup(rs)
end
return T