aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/build_test_only.txt
blob: 8693a80a08e67539a7e331870cd846cb045d57a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Named explicitly, test-only packages should be reported as
# unbuildable/uninstallable, even if there is a wildcard also matching.
! go build m/testonly m/testonly...
stderr 'no non-test Go files in'
! go install ./testonly
stderr 'no non-test Go files in'

# Named through a wildcard, the test-only packages should be silently ignored.
go build m/testonly...
go install ./testonly...

-- go.mod --
module m

go 1.16
-- testonly/t_test.go --
package testonly
-- testonly2/t.go --
package testonly2