...
1env TESTGO_VERSION=go1.100.0
2env TESTGO_VERSION_SWITCH=switch
3
4go get toolchain@go1.22.1
5stderr '^go: added toolchain go1.22.1$'
6! stderr '(added|removed|upgraded|downgraded) go'
7grep 'toolchain go1.22.1' go.mod
8
9go get toolchain@none
10stderr '^go: removed toolchain go1.22.1$'
11! stderr '(added|removed|upgraded|downgraded) go'
12! grep toolchain go.mod
13
14go get toolchain@go1.22.1
15stderr '^go: added toolchain go1.22.1$'
16! stderr '(added|removed|upgraded|downgraded) go'
17grep 'toolchain go1.22.1' go.mod
18
19go get go@1.22.3
20stderr '^go: upgraded go 1.10 => 1.22.3$'
21stderr '^go: upgraded toolchain go1.22.1 => go1.100.0$'
22grep 'go 1.22.3' go.mod
23
24go get go@1.22.3 toolchain@1.22.3
25stderr '^go: removed toolchain go1.100.0$'
26! grep toolchain go.mod
27
28go get go@1.22.1 toolchain@go1.22.3
29stderr '^go: downgraded go 1.22.3 => 1.22.1$'
30stderr '^go: added toolchain go1.22.3$'
31grep 'go 1.22.1' go.mod
32grep 'toolchain go1.22.3' go.mod
33
34go get go@1.22.3 toolchain@1.22.3
35stderr '^go: upgraded go 1.22.1 => 1.22.3$'
36stderr '^go: removed toolchain go1.22.3$'
37grep 'go 1.22.3' go.mod
38! grep toolchain go.mod
39
40go get toolchain@1.22.1
41stderr '^go: downgraded go 1.22.3 => 1.22.1$'
42! stderr toolchain # already gone, was not added
43grep 'go 1.22.1' go.mod
44! grep toolchain go.mod
45
46env TESTGO_VERSION=go1.22.1
47env GOTOOLCHAIN=local
48! go get go@1.22.3
49stderr 'go: updating go.mod requires go >= 1.22.3 \(running go 1.22.1; GOTOOLCHAIN=local\)$'
50
51env TESTGO_VERSION=go1.30
52go get toolchain@1.22.3
53grep 'toolchain go1.22.3' go.mod
54
55go get go@1.22.1
56grep 'go 1.22.1' go.mod
57go get m2@v1.0.0
58stderr '^go: upgraded go 1.22.1 => 1.23$'
59stderr '^go: added m2 v1.0.0$'
60grep 'go 1.23$' go.mod
61
62go get toolchain@go1.23.9 go@1.23.5
63go get toolchain@none
64stderr '^go: removed toolchain go1.23.9'
65! stderr ' go 1'
66grep 'go 1.23.5' go.mod
67
68-- go.mod --
69module m
70go 1.10
71
72replace m2 v1.0.0 => ./m2
73
74-- m2/go.mod --
75module m2
76go 1.23
View as plain text