blob: 8aa61166acf227572555b5a7716189068cb22e90 [file] [log] [blame]
# Test that go.sum does not get updated when -mod=readonly flag is set
env GO111MODULE=on
go get -d rsc.io/quote
go mod tidy
# go.sum != dirty; -mod=readonly
go list -mod=readonly
# dirty up go.sum by removing it.
rm go.sum
# go.sum == dirty; -mod=readonly
! go list -mod=readonly
stderr 'go: updates to go.sum needed, disabled by -mod=readonly'
-- go.mod --
module m
-- main.go --
package main
import "rsc.io/quote"
func main() {
println(quote.Hello())
}