...
Text file
src/cmd/go/testdata/script/test_syntax_error_says_fail.txt
1# Test that the error message for a syntax error in a test go file
2# says FAIL.
3
4env GO111MODULE=off
5! go test syntaxerror
6stderr 'x_test.go:' # check that the error is diagnosed
7stdout 'FAIL' # check that go test says FAIL
8
9env GO111MODULE=on
10cd syntaxerror
11! go test syntaxerror
12stderr 'x_test.go:' # check that the error is diagnosed
13stdout 'FAIL' # check that go test says FAIL
14
15-- syntaxerror/go.mod --
16module syntaxerror
17
18go 1.16
19-- syntaxerror/x.go --
20package p
21-- syntaxerror/x_test.go --
22package p
23
24func f() (x.y, z int) {
25}
View as plain text