| 1 |
# Named explicitly, test-only packages should be reported as |
| 2 |
# unbuildable/uninstallable, even if there is a wildcard also matching. |
| 3 |
! go build m/testonly m/testonly... |
| 4 |
stderr 'no non-test Go files in' |
| 5 |
! go install ./testonly |
| 6 |
stderr 'no non-test Go files in' |
| 7 |
|
| 8 |
# Named through a wildcard, the test-only packages should be silently ignored. |
| 9 |
go build m/testonly... |
| 10 |
go install ./testonly... |
| 11 |
|
| 12 |
-- go.mod -- |
| 13 |
module m |
| 14 |
|
| 15 |
go 1.16 |
| 16 |
-- testonly/t_test.go -- |
| 17 |
package testonly |
| 18 |
-- testonly2/t.go -- |
| 19 |
package testonly2 |