blob: e178377785813404678abb1b0999ef9059f3f373 [file] [log] [blame]
# Test that duplicate imports--and, more generally, duplicate
# identical insertions--are coalesced.
checker -marker -fix example.com/a
exit 3
-- go.mod --
module example.com
go 1.22
-- a/a.go --
package a
import (
_ "errors"
//@ fix1("()//", `"foo"`), fix2("()//", `"foo"`)
)
func f() {} //@ fix1("()}", "n++"), fix2("()}", "n++")
-- want/a/a.go --
package a
import (
_ "errors"
"foo" //@ fix1("()//", `"foo"`), fix2("()//", `"foo"`)
)
func f() { n++ } //@ fix1("()}", "n++"), fix2("()}", "n++")