Commit 28668c3a authored by Rob Pike's avatar Rob Pike

cmd/go: run examples even if -run is set if -example is also set

Allows one to disable everything but the example being debugged.
This time for sure.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5700079
parent 2d6a6ed9
......@@ -23,7 +23,7 @@ type InternalExample struct {
}
func RunExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ok bool) {
if *match != "" {
if *match != "" && *matchExamples == "" {
return // Don't run examples if testing is restricted: we're debugging.
}
ok = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment