diff options
Diffstat (limited to 'src/cmd/go/testdata/script/cover_import_main_loop.txt')
-rw-r--r-- | src/cmd/go/testdata/script/cover_import_main_loop.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/script/cover_import_main_loop.txt b/src/cmd/go/testdata/script/cover_import_main_loop.txt new file mode 100644 index 0000000..36a09c2 --- /dev/null +++ b/src/cmd/go/testdata/script/cover_import_main_loop.txt @@ -0,0 +1,26 @@ +[compiler:gccgo] skip # gccgo has no cover tool + +! go test -n importmain/test +stderr 'not an importable package' # check that import main was detected +! go test -n -cover importmain/test +stderr 'not an importable package' # check that import main was detected + +-- go.mod -- +module importmain + +go 1.16 +-- ismain/main.go -- +package main + +import _ "importmain/test" + +func main() {} +-- test/test.go -- +package test +-- test/test_test.go -- +package test_test + +import "testing" +import _ "importmain/ismain" + +func TestCase(t *testing.T) {} |