cmd/internal/testdir: test constraint parsing fails when test sources are gofmt
'd
#62267
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Testing
An issue that has been verified to require only test changes, not just a test failure.
Milestone
In https://go.dev/cl/522495 I attempted to fix a test failure by editing
test/fixedbugs/issue10607.go
.My editor invoked
gopls
to format the file on save, which added a//go:build
line to the file and added a newline after the// +build
line. I assumed that would be ok, because nothing about the test is specific to the parser.However, that caused the action parsing in
testdir_test.run
to fail, because it expects the first blank line to follow the “action” comment, not the//go:build
line.The text was updated successfully, but these errors were encountered: