testing: revise go help testflags #4508
Closed
Labels
Milestone
Comments
#3: Provides correct information. Pattern `./` doesn't match `BenchmarkLoop`. #4: You're not providing a (benchmark's name) pattern, instead (unescaped/naked) `*` is expanded by the shell to a list of all file names in cwd. I.e. the first one listed was used as a (non matching) pattern. #5: Now the regexp is correct (`.` matches BenchmarkLoop). Alternative examples which should work: `go test -bench B`, `go test -bench Loop`. No need for the `./` if the *_test.go files are in cwd. Suggesting to close w/ "Working as inteded". |
I think we can add something like By default no benchmarks run. To run all benchmarks, use a pattern that will match them all, like: -benchmark . I'd also like to swap the flag descriptions. It should list the flags and then at the end mention that binaries need -test. Most people shouldn't need to say '-test.'. to the 'go help testflag' output Labels changed: added priority-later, removed priority-triage. Status changed to Accepted. |
This issue was closed by revision 89a2a8c. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by bronze1man:
The text was updated successfully, but these errors were encountered: