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

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

View as plain text