1 [short] skip
2 [!exec:hg] skip
3
4 env GO111MODULE=on
5 env GOPROXY=direct
6 env GOSUMDB=off
7 env GOMODCACHE=$WORK/modcache
8
9 # go mod download vcstest/hello/sub/v9 should also fail, print origin info
10 # hg uses RepoSum instead of TagSum to describe failure condition.
11 ! go mod download -x -json vcs-test.golang.org/hg/hello.hg/sub/v9@latest
12 cp stdout hellosubv9.json
13 stdout '"Version": "latest"'
14 stdout '"Error":.*no matching versions'
15 ! stdout '"TagPrefix"'
16 stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
17 stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
18
19 # reuse go mod download vcstest/hello/sub/v9 error result
20 go clean -modcache
21 ! go mod download -reuse=hellosubv9.json -x -json vcs-test.golang.org/hg/hello.hg/sub/v9@latest
22 ! stderr 'hg( .*)* pull'
23 stdout '"Reuse": true'
24 stdout '"Error":.*no matching versions'
25 ! stdout '"TagPrefix"'
26 stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
27 stdout '"Ref": "tip"'
28 stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
29 ! stdout '"(Dir|Info|GoMod|Zip)"'
View as plain text