Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
proposal: cmd/go: use anchored matching inside "go test -run" pattern #27382
go version go1.11 linux/amd64
I just got bitten by this behaviour, which was unexpected to me.
I expected it to run
In order to make it work as I expected, I need to do:
Given that this is a common thing to want to do, and the regexp
The sequence of regular expressions implied above would be:
Sorry but I think it's too late to change this. This API is set. In general I treat cmd/go's command-line API the same way we treat package APIs - don't redefine existing behaviors (don't make breaking changes).
I use the substring all the time, as in -run=Foo/Bar.