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: make test -list prints everything when passed no regex #20612
Comments
How to define 'no regex'? What is 'foo' in |
If there's anything after the flag, that thing is the regex. If you need to
specify a path then you'll need to spell it out and in that case using .
for the regex is not that annoying (it's just one character more).
What I'm proposing is just that "go test -list", literally that string and
nothing else, does something useful. Because I feel that is how the flag
will be often used.
I understand this may raise concerns about consistency.
…On 8 Jun 2017 3:21 p.m., "cznic" ***@***.***> wrote:
How to define 'no regex'? What is 'foo' in go test -list foo? An Import
path or a regexp?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20612 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADa68xSmLzGlruvPE2h5i0VdsDLHyjbNks5sB_V2gaJpZM4Nz7v9>
.
|
I'm concerned about consistency, in particular how this would confuse people using |
Yeah I thought about this a little more and it is probably not a good idea.
Especially introducing inconsistent behaviour with bench and test.
Thanks for the feedback.
…On 8 Jun 2017 3:51 p.m., "Daniel Martí" ***@***.***> wrote:
I'm concerned about consistency, in particular how this would confuse
people using go test -list alone. For example, -bench requires you to use
a silly regex like . if you want to run all benchmarks. And I'd say go
test -bench=. is way more common than go test -list=..
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#20612 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADa68-SyMRU7JNNUNieSzt0dl3RUkdvdks5sB_x0gaJpZM4Nz7v9>
.
|
Perhaps keep it open in case ayone agrees with the general idea. If there's a time to change how |
How about we think about this for Go 1.10? If we wanted to add this support, we can add it later, and we can also modify |
Sounds good. I would love to get rid of the |
No. Currently |
CL 41195 added a new
-list
flag togo test
that can be used to list all the Tests, Benchmarks and Examples without running them. It takes a regex argument:but the default behaviour when passed no arguments it's unhelpful and frustrating: it says
and exits.
It would be nice if
go test -list
could, when passed no regex, just print everything without forcing me to typegotip test -list .
The text was updated successfully, but these errors were encountered: