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

     1  [gccgo] skip # gccgo has no cover tool
     2  
     3  ! go test -n importmain/test
     4  stderr 'not an importable package' # check that import main was detected
     5  ! go test -n -cover importmain/test
     6  stderr 'not an importable package' # check that import main was detected
     7  
     8  -- go.mod --
     9  module importmain
    10  
    11  go 1.16
    12  -- ismain/main.go --
    13  package main
    14  
    15  import _ "importmain/test"
    16  
    17  func main() {}
    18  -- test/test.go --
    19  package test
    20  -- test/test_test.go --
    21  package test_test
    22  
    23  import "testing"
    24  import _ "importmain/ismain"
    25  
    26  func TestCase(t *testing.T) {}
    27  

View as plain text