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  
     4  env GO111MODULE=off
     5  ! go test syntaxerror
     6  stderr 'x_test.go:' # check that the error is diagnosed
     7  stdout 'FAIL' # check that go test says FAIL
     8  
     9  env GO111MODULE=on
    10  cd syntaxerror
    11  ! go test syntaxerror
    12  stderr 'x_test.go:' # check that the error is diagnosed
    13  stdout 'FAIL' # check that go test says FAIL
    14  
    15  -- syntaxerror/go.mod --
    16  module syntaxerror
    17  
    18  go 1.16
    19  -- syntaxerror/x.go --
    20  package p
    21  -- syntaxerror/x_test.go --
    22  package p
    23  
    24  func f() (x.y, z int) {
    25  }
    26  

View as plain text