| 1 |
[!net:golang.org] skip |
| 2 |
[!git] 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 golang.org/x/[email protected] |
| 13 |
stdout '"Version": "v0.0.0-20171215141712-a1b916ed6726",' |
| 14 |
|
| 15 |
# If GOPROXY is 'off', lookups should use whatever pseudo-version is available. |
| 16 |
env GOPROXY=off |
| 17 |
go mod download -json golang.org/x/text@a1b916ed6726 |
| 18 |
stdout '"Version": "v0.0.0-20171215141712-a1b916ed6726",' |
| 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 golang.org/x/text@a1b916ed6726 |
| 24 |
stdout '"Version": "v0.3.1-0.20171215141712-a1b916ed6726",' |
| 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 golang.org/x/text@a1b916ed6726 |
| 29 |
stdout '"Version": "v0.3.1-0.20171215141712-a1b916ed6726",' |