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

     1  env GO111MODULE=off
     2  
     3  # Test that a main_test of 'package main' imports the package,
     4  # not the installed binary.
     5  
     6  [short] skip
     7  
     8  env GOBIN=$WORK/bin
     9  go test main_test
    10  go install main_test
    11  
    12  go list -f '{{.Stale}}' main_test
    13  stdout false
    14  
    15  go test main_test
    16  
    17  -- main_test/m.go --
    18  package main
    19  
    20  func F()    {}
    21  func main() {}
    22  -- main_test/m_test.go --
    23  package main_test
    24  
    25  import (
    26  	. "main_test"
    27  	"testing"
    28  )
    29  
    30  func Test1(t *testing.T) {
    31  	F()
    32  }
    33  

View as plain text