proposal: cmd/go: change go test to FAIL if -run
is specified but no tests match
#64500
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Proposal
Milestone
Proposal Details
If
-run
is provided but there is no test matching the pattern,go test
currently considers the test run PASS and exits with 0.Even though there is a warning like "testing: warning: no tests to run", this is easy to miss or dropped when the test binary runs by other runners (ide plugins, dlv, ..). I think when users set
-run
and if there is no matching test, that's likely not what users wanted, and treating it like misuse of command is more appropriate.The text was updated successfully, but these errors were encountered: