env GO111MODULE=on

cp go.mod.empty go.mod
go get gopkg.in/dummy.v2-unstable

cp x.go.txt x.go
cp go.mod.empty go.mod
go list

[!net] skip
[!exec:git] skip

env GOPROXY=direct
env GOSUMDB=off
go get gopkg.in/macaroon-bakery.v2-unstable/bakery
go list -m all
stdout 'gopkg.in/macaroon-bakery.v2-unstable v2.0.0-[0-9]+-[0-9a-f]+$'

-- go.mod.empty --
module m

-- x.go.txt --
package x
import _ "gopkg.in/dummy.v2-unstable"
