Text file src/cmd/go/testdata/script/reuse_hg_hellononhash.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@1234567890123456789012345678901234567890 should fail, still print origin info
    10  # (40 hex digits is assumed to be a full hash and is a slightly different code path from @nonexist)
    11  ! go mod download -x -json vcs-test.golang.org/hg/hello.hg@1234567890123456789012345678901234567890
    12  cp stdout hellononhash.json
    13  stdout '"Version": "1234567890123456789012345678901234567890"'
    14  stdout '"Error":.*unknown revision 1234567890123456789012345678901234567890'
    15  stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    16  ! stdout '"(TagPrefix|TagSum|Ref|Hash)"'
    17  
    18  # reuse go mod download vcstest/hello@1234567890123456789012345678901234567890
    19  go clean -modcache
    20  ! go mod download -reuse=hellononhash.json -x -json vcs-test.golang.org/hg/hello.hg@1234567890123456789012345678901234567890
    21  ! stderr 'hg( .*)* pull'
    22  stdout '"Reuse": true'
    23  stdout '"Version": "1234567890123456789012345678901234567890"'
    24  stdout '"Error":.*unknown revision 1234567890123456789012345678901234567890'
    25  stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    26  ! stdout '"(TagPrefix|TagSum|Ref|Hash)"'
    27  ! stdout '"(Dir|Info|GoMod|Zip)"'

View as plain text