]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgo/go/cmd/go/testdata/script/cover_pkgall_multiple_mains.txt
libgo: update to Go1.14beta1
[thirdparty/gcc.git] / libgo / go / cmd / go / testdata / script / cover_pkgall_multiple_mains.txt
CommitLineData
04862afe
ILT
1# This test checks that multiple main packages can be tested
2# with -coverpkg=all without duplicate symbol errors.
5a8ea165 3# Verifies golang.org/issue/30374, golang.org/issue/34114.
04862afe
ILT
4
5[short] skip
5a8ea165
ILT
6cd $GOPATH/src/example.com/cov
7
8env GO111MODULE=on
9go test -coverpkg=all ./...
04862afe 10
5a8ea165 11env GO111MODULE=off
04862afe
ILT
12go test -coverpkg=all ./...
13
5a8ea165 14-- $GOPATH/src/example.com/cov/go.mod --
04862afe
ILT
15module example.com/cov
16
5a8ea165 17-- $GOPATH/src/example.com/cov/mainonly/mainonly.go --
04862afe
ILT
18package main
19
20func main() {}
21
5a8ea165 22-- $GOPATH/src/example.com/cov/mainwithtest/mainwithtest.go --
04862afe
ILT
23package main
24
25func main() {}
26
27func Foo() {}
28
5a8ea165 29-- $GOPATH/src/example.com/cov/mainwithtest/mainwithtest_test.go --
04862afe
ILT
30package main
31
32import "testing"
33
34func TestFoo(t *testing.T) {
35 Foo()
36}
37
5a8ea165 38-- $GOPATH/src/example.com/cov/xtest/x.go --
04862afe
ILT
39package x
40
5a8ea165 41-- $GOPATH/src/example.com/cov/xtest/x_test.go --
04862afe
ILT
42package x_test
43
44import "testing"
45
46func TestX(t *testing.T) {}