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

     1  [!git] skip
     2  [short] skip
     3  
     4  env GO111MODULE=on
     5  env GOPROXY=direct
     6  env GOSUMDB=off
     7  
     8  # Regression test for golang.org/issue/27171: after resolving an older
     9  # pseudo-version of a commit, future resolution of that commit by hash should
    10  # choose the highest appropriate pseudo-version instead of the cached one.
    11  
    12  go mod download -json vcs-test.golang.org/git/commit-after-tag.git@v0.0.0-20190715211727-b325d8217783
    13  stdout '"Version": "v0.0.0-20190715211727-b325d8217783",'
    14  
    15  # If GOPROXY is 'off', lookups should use whatever pseudo-version is available.
    16  env GOPROXY=off
    17  go mod download -json vcs-test.golang.org/git/commit-after-tag.git@b325d8217783
    18  stdout '"Version": "v0.0.0-20190715211727-b325d8217783",'
    19  
    20  # If we can re-resolve the commit to a pseudo-version, fetching the commit by
    21  # hash should use the highest such pseudo-version appropriate to the commit.
    22  env GOPROXY=direct
    23  go mod download -json vcs-test.golang.org/git/commit-after-tag.git@b325d8217783
    24  stdout '"Version": "v1.0.1-0.20190715211727-b325d8217783",'
    25  
    26  # If GOPROXY is 'off', lookups should use the highest pseudo-version in the cache.
    27  env GOPROXY=off
    28  go mod download -json vcs-test.golang.org/git/commit-after-tag.git@b325d8217783
    29  stdout '"Version": "v1.0.1-0.20190715211727-b325d8217783",'
    30  

View as plain text