...

Text file src/cmd/go/testdata/script/reuse_hg_hellolist.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 list on repo with no tags
    10go clean -modcache
    11go list -x -json -m -retracted -versions vcs-test.golang.org/hg/hello.hg@latest
    12stderr 'hg( .*)* pull'
    13cp stdout hellolist.json
    14! stdout '"Versions"'
    15stdout '"Version": "v0.0.0-20170922011414-e483a7d9f8c9"'
    16stdout '"VCS": "hg"'
    17stdout '"URL": ".*/hg/hello"'
    18stdout '"Query": "latest"'
    19stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
    20stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    21
    22# reuse go list on repo with no tags
    23go clean -modcache
    24go list -x -reuse=hellolist.json -json -m -retracted -versions vcs-test.golang.org/hg/hello.hg@latest
    25! stderr 'hg( .*)* pull'
    26stdout '"Reuse": true'
    27! stdout '"Versions"'
    28stdout '"Version": "v0.0.0-20170922011414-e483a7d9f8c9"'
    29stdout '"VCS": "hg"'
    30stdout '"URL": ".*/hg/hello"'
    31stdout '"Query": "latest"'
    32stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'
    33stdout '"Hash": "e483a7d9f8c9b4bc57430bdd8f81f0a65e4011c0"'
    34
    35# reuse with stale list
    36go clean -modcache
    37cp hellolist.json hellolistbad.json
    38replace 'blLvkhBri' 'ZZZ' hellolistbad.json
    39go clean -modcache
    40go list -x -reuse=hellolistbad.json -json -m -retracted -versions vcs-test.golang.org/hg/hello.hg@latest
    41stderr 'hg( .*)* pull'
    42! stdout '"Reuse": true'
    43stdout '"RepoSum": "r1:blLvkhBriVMV[+]6Il4Ub43wlyWXIe1NpobTelF0peaG0="'

View as plain text