...

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

Documentation: cmd/go/testdata/script

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

View as plain text