...
1[!net:golang.org] skip
2[!git] skip
3
4env GO111MODULE=on
5env GOPROXY=direct
6env 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
12go mod download -json golang.org/x/text@v0.0.0-20171215141712-a1b916ed6726
13stdout '"Version": "v0.0.0-20171215141712-a1b916ed6726",'
14
15# If GOPROXY is 'off', lookups should use whatever pseudo-version is available.
16env GOPROXY=off
17go mod download -json golang.org/x/text@a1b916ed6726
18stdout '"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.
22env GOPROXY=direct
23go mod download -json golang.org/x/text@a1b916ed6726
24stdout '"Version": "v0.3.1-0.20171215141712-a1b916ed6726",'
25
26# If GOPROXY is 'off', lookups should use the highest pseudo-version in the cache.
27env GOPROXY=off
28go mod download -json golang.org/x/text@a1b916ed6726
29stdout '"Version": "v0.3.1-0.20171215141712-a1b916ed6726",'
View as plain text