1 # 'go mod tidy' should remove content sums for module versions that aren't
2 # in the build list. It should preserve go.mod sums for module versions that
3 # are in the module graph though.
4 # Verifies golang.org/issue/33008.
5 go mod tidy
6 ! grep '^rsc.io/quote v1.5.0 h1:' go.sum
7 grep '^rsc.io/quote v1.5.0/go.mod h1:' go.sum
8
9 -- go.mod --
10 module m
11
12 go 1.15
13
14 require (
15 rsc.io/quote v1.5.2
16 example.com/r v0.0.0
17 )
18
19 replace example.com/r => ./r
20
21 -- go.sum --
22 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:pvCbr/wm8HzDD3fVywevekufpn6tCGPY3spdHeZJEsw=
23 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
24 rsc.io/quote v1.5.0 h1:6fJa6E+wGadANKkUMlZ0DhXFpoKlslOQDCo259XtdIE=
25 rsc.io/quote v1.5.0/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=
26 rsc.io/quote v1.5.2 h1:3fEykkD9k7lYzXqCYrwGAf7iNhbk4yCjHmKBN9td4L0=
27 rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=
28 rsc.io/sampler v1.3.0 h1:HLGR/BgEtI3r0uymSP/nl2uPLsUnNJX8toRyhfpBTII=
29 rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
30 rsc.io/testonly v1.0.0 h1:K/VWHdO+Jv7woUXG0GzVNx1czBXUt3Ib1deaMn+xk64=
31 rsc.io/testonly v1.0.0/go.mod h1:OqmGbIFOcF+XrFReLOGZ6BhMM7uMBiQwZsyNmh74SzY=
32
33 -- r/go.mod --
34 module example.com/r
35
36 require rsc.io/quote v1.5.0
37
38 -- use.go --
39 package use
40
41 import _ "example.com/r"
42
43 -- r/use.go --
44 package use
45
46 import _ "rsc.io/quote"
47
View as plain text