# 'go mod tidy' should remove content sums for module versions that aren't
# in the build list. It should preserve go.mod sums for module versions that
# are in the module graph though.
# Verifies golang.org/issue/33008.
go mod tidy
! grep '^rsc.io/quote v1.5.0 h1:' go.sum
grep '^rsc.io/quote v1.5.0/go.mod h1:' go.sum

-- go.mod --
module m

go 1.15

require (
	rsc.io/quote v1.5.2
	example.com/r v0.0.0
)

replace example.com/r => ./r

-- go.sum --
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c h1:pvCbr/wm8HzDD3fVywevekufpn6tCGPY3spdHeZJEsw=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
rsc.io/quote v1.5.0 h1:6fJa6E+wGadANKkUMlZ0DhXFpoKlslOQDCo259XtdIE=
rsc.io/quote v1.5.0/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=
rsc.io/quote v1.5.2 h1:3fEykkD9k7lYzXqCYrwGAf7iNhbk4yCjHmKBN9td4L0=
rsc.io/quote v1.5.2/go.mod h1:LzX7hefJvL54yjefDEDHNONDjII0t9xZLPXsUe+TKr0=
rsc.io/sampler v1.3.0 h1:HLGR/BgEtI3r0uymSP/nl2uPLsUnNJX8toRyhfpBTII=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
rsc.io/testonly v1.0.0 h1:K/VWHdO+Jv7woUXG0GzVNx1czBXUt3Ib1deaMn+xk64=
rsc.io/testonly v1.0.0/go.mod h1:OqmGbIFOcF+XrFReLOGZ6BhMM7uMBiQwZsyNmh74SzY=

-- r/go.mod --
module example.com/r

require rsc.io/quote v1.5.0

-- use.go --
package use

import _ "example.com/r"

-- r/use.go --
package use

import _ "rsc.io/quote"
