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

     1  env GO111MODULE=on
     2  
     3  # Testing git->module converter's generation of +incompatible tags; turn off proxy.
     4  [!net:github.com] skip
     5  [!git] skip
     6  env GOPROXY=direct
     7  env GOSUMDB=off
     8  
     9  # We can resolve the @master branch without unshallowing the local repository
    10  # (even with older gits), so try that before we do anything else.
    11  # (This replicates https://golang.org/issue/26713 with git 2.7.4.)
    12  go get github.com/rsc/legacytest@master
    13  go list -m all
    14  stdout '^github.com/rsc/legacytest v2\.0\.1-0\.\d{14}-7303f7796364\+incompatible$'
    15  
    16  # get should include incompatible tags in "latest" calculation.
    17  go mod edit -droprequire github.com/rsc/legacytest
    18  go get github.com/rsc/legacytest@latest
    19  go list
    20  go list -m all
    21  stdout '^github.com/rsc/legacytest v2\.0\.0\+incompatible$'
    22  
    23  # v2.0.1-0.pseudo+incompatible
    24  go get ...test@7303f77
    25  go list -m all
    26  stdout '^github.com/rsc/legacytest v2\.0\.1-0\.\d{14}-7303f7796364\+incompatible$'
    27  
    28  # v2.0.0+incompatible by tag+incompatible
    29  go get ...test@v2.0.0+incompatible
    30  go list -m all
    31  stdout '^github.com/rsc/legacytest v2\.0\.0\+incompatible$'
    32  
    33  # v2.0.0+incompatible by tag
    34  go get ...test@v2.0.0
    35  go list -m all
    36  stdout '^github.com/rsc/legacytest v2\.0\.0\+incompatible$'
    37  
    38  # v2.0.0+incompatible by hash (back on master)
    39  go get ...test@d7ae1e4
    40  go list -m all
    41  stdout '^github.com/rsc/legacytest v2\.0\.0\+incompatible$'
    42  
    43  # v1.2.1-0.pseudo
    44  go get ...test@d2d4c3e
    45  go list -m all
    46  stdout '^github.com/rsc/legacytest v1\.2\.1-0\.\d{14}-d2d4c3ea6623$'
    47  
    48  # v1.2.0
    49  go get ...test@9f6f860
    50  go list -m all
    51  stdout '^github.com/rsc/legacytest v1\.2\.0$'
    52  
    53  # v1.1.0-pre.0.pseudo
    54  go get ...test@fb3c628
    55  go list -m all
    56  stdout '^github.com/rsc/legacytest v1\.1\.0-pre\.0\.\d{14}-fb3c628075e3$'
    57  
    58  # v1.1.0-pre (no longer on master)
    59  go get ...test@731e3b1
    60  go list -m all
    61  stdout '^github.com/rsc/legacytest v1\.1\.0-pre$'
    62  
    63  # v1.0.1-0.pseudo
    64  go get ...test@fa4f5d6
    65  go list -m all
    66  stdout '^github.com/rsc/legacytest v1\.0\.1-0\.\d{14}-fa4f5d6a71c6$'
    67  
    68  # v1.0.0
    69  go get ...test@7fff7f3
    70  go list -m all
    71  stdout '^github.com/rsc/legacytest v1\.0\.0$'
    72  
    73  # v0.0.0-pseudo
    74  go get ...test@52853eb
    75  go list -m all
    76  stdout '^github.com/rsc/legacytest v0\.0\.0-\d{14}-52853eb7b552$'
    77  
    78  -- go.mod --
    79  module x
    80  -- x.go --
    81  package x
    82  import "github.com/rsc/legacytest"
    83  

View as plain text