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

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

View as plain text