Skip to content

testing: syntax errors not picked up if no tests cases #8555

@mitchellh

Description

@mitchellh
go version go1.3 darwin/amd64

Create two files:

"foo.go": 

package foo

func foo() {
    NOPE I AM A SYNTAX ERROR
}
j

"foo_test.go":

package foo

Then run `go test` and the test passes. If you add a single test case to `foo_test.go`,
then it errors as expected. I believe that this was not the behavior with Go 1.2 but
haven't verified. I have a lot of test cases for really basic packages that I just want
to test compilation, and it no longer is testing that, when it was before.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions