summaryrefslogtreecommitdiffstats
path: root/src/cmd/go/testdata/script/version_replace.txt
blob: ec98f4e3f3ac260341468fd91374a36eaff28cf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[short] skip

go mod download example.com/printversion@v0.1.0 example.com/printversion@v1.0.0
go get -d example.com/printversion@v0.1.0
go install example.com/printversion

go run example.com/printversion
cmp stdout out.txt

go version -m $GOPATH/bin/printversion$GOEXE
stdout '^.*[/\\]bin[/\\]printversion'$GOEXE': .*$'
stdout '^	path	example.com/printversion$'
stdout '^	mod	example.com/printversion	v0.1.0$'
stdout '^	=>	example.com/printversion	v1.0.0	h1:.*$'
stdout '^	dep	example.com/version	v1.0.0$'
stdout '^	=>	example.com/version	v1.0.1	h1:.*$'

-- go.mod --
module golang.org/issue/37392
go 1.14
require (
	example.com/printversion v0.1.0
)
replace (
	example.com/printversion => example.com/printversion v1.0.0
	example.com/version v1.0.0 => example.com/version v1.0.1
)
-- out.txt --
path is example.com/printversion
main is example.com/printversion v0.1.0
	(replaced by example.com/printversion v1.0.0)
using example.com/version v1.0.0
	(replaced by example.com/version v1.0.1)