-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
testing: skip flag not applied to examples #61482
Comments
cc @bcmills |
@pascaldekloe, want to send a fix? |
Maybe @bcmills. There's too many bugs open in the Go command and they start to bother me now. Will let you know here if I take it. |
@pascaldekloe I can try working on this if you don't mind ;) |
You're not wrong about the Go command (it bothers me too!), but technically this bug is in the |
The go test flags -skip and -run had no effect in example tests. Fixes golang#61482
The go test flag -skip had no effect in example tests. Fixes golang#61482
Change https://go.dev/cl/511837 mentions this issue: |
The go test flag -skip had no effect in example tests. Fixes golang#61482
Change https://go.dev/cl/519595 mentions this issue: |
CL 511837 added a check for go test -skip Example but it currently doesn't verify that the example doesn't show up in the command output. Add such a check. For #61482 Change-Id: I3a8f82fc137739bf291f39bf7719ff92cfc74f9d Reviewed-on: https://go-review.googlesource.com/c/go/+/519595 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
Run
go test -v strings -skip Trim
.What did you expect to see?
Regular expression "Trim" should skip
ExampleTrim
.What did you see instead?
Go runs
ExampleTrim
anyway.It does skip
TestTrim
though.The text was updated successfully, but these errors were encountered: