...

Text file src/cmd/go/testdata/script/reuse_hg_hellononexist.txt

Documentation: cmd/go/testdata/script

     1[short] skip
     2[!exec:hg] skip
     3
     4env GO111MODULE=on
     5env GOPROXY=direct
     6env GOSUMDB=off
     7env GOMODCACHE=$WORK/modcache
     8
     9# go mod download vcstest/hello@nonexist should fail, still print origin info
    10! go mod download -x -json vcs-test.golang.org/hg/hello.hg@nonexist
    11cp stdout hellononexist.json
    12stdout '"Version": "nonexist"'
    13stdout '"Error":.*unknown revision nonexist'
    14stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    15! stdout '"(TagPrefix|TagSum|Ref|Hash)"'
    16
    17# reuse go mod download vcstest/hello@nonexist
    18go clean -modcache
    19! go mod download -reuse=hellononexist.json -x -json vcs-test.golang.org/hg/hello.hg@nonexist
    20! stderr 'hg( .*)* pull'
    21stdout '"Reuse": true'
    22stdout '"Version": "nonexist"'
    23stdout '"Error":.*unknown revision nonexist'
    24stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    25! stdout '"(TagPrefix|TagSum|Ref|Hash)"'
    26! stdout '"(Dir|Info|GoMod|Zip)"'

View as plain text