Skip to content

cmd/go: "go test" should fail if package does not build #7108

@alexbrainman

Description

@alexbrainman
Steps to reproduce:

# cd $GOROOT/src/pkg/image/color/palette
# hg id
72f6ec05c6ca
# hg st
# echo "Hello world" >> palette.go
# go test; echo $?
?       image/color/palette     [no test files]
0

But "go build" fails:

# go build; echo $?
# image/color/palette
./palette.go:505: non-declaration statement outside function body
./palette.go:505: syntax error: unexpected name, expecting semicolon or newline
2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions