...

Text file src/cmd/go/testdata/script/reuse_hg_hellononpseudo.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@v0.0.0-20220101120101-123456789abc should fail, still print origin info
    10# (non-existent pseudoversion)
    11! go mod download -x -json vcs-test.golang.org/hg/hello.hg@v0.0.0-20220101120101-123456789abc
    12cp stdout hellononpseudo.json
    13stdout '"Version": "v0.0.0-20220101120101-123456789abc"'
    14stdout '"Error":.*unknown revision 123456789abc'
    15stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    16! stdout '"(TagPrefix|TagSum|Ref|Hash)"'
    17
    18# reuse go mod download vcstest/hello@v0.0.0-20220101120101-123456789abc
    19go clean -modcache
    20! go mod download -reuse=hellononpseudo.json -x -json vcs-test.golang.org/hg/hello.hg@v0.0.0-20220101120101-123456789abc
    21! stderr 'hg( .*)* pull'
    22stdout '"Reuse": true'
    23stdout '"Version": "v0.0.0-20220101120101-123456789abc"'
    24stdout '"Error":.*unknown revision 123456789abc'
    25stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    26! stdout '"(TagPrefix|TagSum|Ref|Hash)"'
    27! stdout '"(Dir|Info|GoMod|Zip)"'

View as plain text