...

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

Documentation: cmd/go/testdata/script

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

View as plain text