src/cmd/go/testdata/script/test_build_failure.txt
raw| 1 | [short] skip |
| 2 | |
| 3 | ! go test -x coverbad |
| 4 | ! stderr '[\\/]coverbad\.test( |$)' # 'go test' should not claim to have run the test. |
| 5 | stderr 'undefined: g' |
| 6 | [cgo] stderr 'undefined: j' |
| 7 | |
| 8 | -- go.mod -- |
| 9 | module coverbad |
| 10 | |
| 11 | go 1.16 |
| 12 | -- p.go -- |
| 13 | package p |
| 14 | |
| 15 | func f() { |
| 16 | g() |
| 17 | } |
| 18 | -- p1.go -- |
| 19 | package p |
| 20 | |
| 21 | import "C" |
| 22 | |
| 23 | func h() { |
| 24 | j() |
| 25 | } |
| 26 | -- p_test.go -- |
| 27 | package p |
| 28 | |
| 29 | import "testing" |
| 30 | |
| 31 | func Test(t *testing.T) {} |