1 # Check that mod tidy does not introduce repeated
2 # require statements when input go.mod has quoted requirements.
3 env GO111MODULE=on
4
5 go mod tidy
6 grep -count=1 rsc.io/quote go.mod
7
8 cp go.mod2 go.mod
9 go mod tidy
10 grep -count=1 rsc.io/quote go.mod
11
12
13 -- go.mod --
14 module x
15
16 -- x.go --
17 package x
18 import "rsc.io/quote"
19 func main() { _ = quote.Hello }
20
21 -- go.mod2 --
22 module x
23 require (
24 "rsc.io/sampler" v1.3.0
25 "rsc.io/quote" v1.5.2
26 )
27
View as plain text