diff options
Diffstat (limited to 'src/testing')
| -rw-r--r-- | src/testing/example.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/testing/example.go b/src/testing/example.go index 42ee555cb2..07aa5cb66c 100644 --- a/src/testing/example.go +++ b/src/testing/example.go @@ -6,7 +6,6 @@ package testing import ( "fmt" - "os" "sort" "strings" "time" @@ -29,14 +28,11 @@ func RunExamples(matchString func(pat, str string) (bool, error), examples []Int func runExamples(matchString func(pat, str string) (bool, error), examples []InternalExample) (ran, ok bool) { ok = true - var eg InternalExample + m := newMatcher(matchString, *match, "-test.run", *skip) + var eg InternalExample for _, eg = range examples { - matched, err := matchString(*match, eg.Name) - if err != nil { - fmt.Fprintf(os.Stderr, "testing: invalid regexp for -test.run: %s\n", err) - os.Exit(1) - } + _, matched, _ := m.fullName(nil, eg.Name) if !matched { continue } |
