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

     1  # Tests issue #12156, a former index out of range panic.
     2  
     3  env GO111MODULE=off
     4  env GOPATH=$WORK/gopath/src/testvendor2 # vendor/x is directly in $GOPATH, not in $GOPATH/src
     5  cd $WORK/gopath/src/testvendor2/src/p
     6  
     7  ! go build p.go
     8  ! stderr panic # Make sure it doesn't panic
     9  stderr 'cannot find package "x"'
    10  
    11  -- testvendor2/src/p/p.go --
    12  package p
    13  
    14  import "x"
    15  -- testvendor2/vendor/x/x.go --
    16  package x
    17  

View as plain text