New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go test [-h | -? | -help] shows output for go help #6576
Labels
Milestone
Comments
@minux That's fine. I would think users would expect either the result of "go help testflag" or a listing of all the flags that the test execution expects (which go test -abcdefg gives). The current output is the result of running "go help" or "go -h", etc. It's nice for folks running tests to see the flags that the current test execution expects, in the most intuitive way. Sample output: go test [-h | -? | help] Usage of /home/all/tmp/go-build595553679/ugorji.net/codec/_test/codec.test: -bd=1: Bench Depth: If >1, potential unreliable results due to stack growth -tdbg=false: Test Debug -test.bench="": regular expression to select benchmarks to run ... For more detailed information on the standard test flags, run "go help testflag". |
On further thought, I agree too that go test [-h | -? | -help] should output result of "go help testflag". This is consistent with other go XXX commands. Having said that, it will be nice to have a standard command recognized by "go test" that will show the flags that the current test execution takes. Right now, the workaround is to pass a non recognized flag. |
a hacky solution: https://golang.org/cl/14502065 |
This issue was closed by revision 8606b97. Status changed to Fixed. |
CL https://golang.org/cl/12173 mentions this issue. |
rsc
added a commit
that referenced
this issue
Jul 15, 2015
Originally 'go test -h' printed the output of 'go help test'. Then issue #6576 was filed, because that output didn't list (for example) -bench. CL 14502065 changed 'go test -h' to print the output of 'go help testflag'. Then issue #9209 was filed, because that output didn't list (for example) -c. To print all the relevant flags, parts of both 'go help test' and 'go help testflag' are needed. Refactor the help messages to make those parts available and print them. Fixes #9209. Change-Id: Ie8205b8fb37d00c10d25b3fc98f14286ec46c4e3 Reviewed-on: https://go-review.googlesource.com/12173 Reviewed-by: Rob Pike <r@golang.org>
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: