blob: 6bc1c77ed3d0d76e8d52242dd253370af0092034 [file] [log] [blame]
env GO111MODULE=on
# Before vendoring, we expect to see the original directory.
go list -f '{{.Version}} {{.Dir}}' -m
stdout 'v3.0.0'
stdout '.*[/\\][/\\]quote[/\\]v3'
# Since all dependencies are replaced, 'go mod vendor' should not
# have to download anything from the network.
go mod vendor
! stderr 'downloading'
! stderr 'finding'
# After vendoring, we expect to see the replacement in the vendor directory,
# without attempting to look up the non-replaced version.
cmp vendor/ local/
go list -mod=vendor -f '{{.Version}} {{.Dir}}' -m
stdout 'v3.0.0'
stdout '.*[/\\]vendor[/\\][/\\]quote[/\\]v3'
! stderr 'finding'
! stderr 'lookup disabled'
-- go.mod --
require v3.0.0
replace => ./local/
-- imports.go --
package replace
import _ ""
-- local/ --
-- local/ --
package quote