From 28668c3a28c8eee186362692af981d9f4fc4fc96 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 27 Feb 2012 16:23:22 +1100 Subject: [PATCH] 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 --- src/pkg/testing/example.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/testing/example.go b/src/pkg/testing/example.go index c48d0d8159..70b69e9962 100644 --- a/src/pkg/testing/example.go +++ b/src/pkg/testing/example.go @@ -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 -- 2.48.1