blob: be3db42d1d9c1f104c78e0ba0c92c90b49288300 [file] [log] [blame]
# Verifies
# If we are already using an +incompatible version, we shouldn't look up
# a lower compatible version when upgrading.
cp go.mod go.mod.orig
go mod tidy
cmp go.mod.orig go.mod
grep '^ v2\.0\.0\+incompatible' go.sum
! grep '^ v1.0.0' go.sum
go get -d
cmp go.mod.orig go.mod
! grep '^ v1.0.0' go.sum
# TODO( the 'go get' command above should not change
# go.sum. However, as part of the query above, we download,
# an unrelated module, since it's a possible prefix. The sum for that module
# should not be written to go.sum.
-- go.mod --
module m
go 1.15
require v2.0.0+incompatible
-- use.go --
package use
import _ ""