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

     1  # https://golang.org/issue/44296: the --versions flag should not affect
     2  # the version reported by 'go list' in case of retractions.
     3  
     4  env FMT='{{.Path}}{{with .Error}}: {{printf "%q" .Err}}{{end}} {{printf "%q" .Version}}{{with .Versions}} {{.}}{{end}}'
     5  
     6  go list -m -e -f $FMT example.com/retract/self/pseudo
     7  stdout '^example.com/retract/self/pseudo: "module example.com/retract/self/pseudo: not a known dependency" ""$'
     8  
     9  go list -m -e -f $FMT example.com/retract/self/pseudo@latest
    10  stdout '^example.com/retract/self/pseudo: "module example.com/retract/self/pseudo: no matching versions for query \\"latest\\"" "latest"$'
    11  
    12  
    13  go list -m -e -f $FMT --versions example.com/retract/self/pseudo
    14  stdout '^example.com/retract/self/pseudo ""$'
    15  
    16  go list -m -e -f $FMT --versions example.com/retract/self/pseudo@latest
    17  stdout '^example.com/retract/self/pseudo: "module example.com/retract/self/pseudo: no matching versions for query \\"latest\\"" "latest"$'
    18  
    19  -- go.mod --
    20  module test
    21  
    22  go 1.17
    23  

View as plain text