aboutsummaryrefslogtreecommitdiff
path: root/src/testing/match.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/match.go')
-rw-r--r--src/testing/match.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/testing/match.go b/src/testing/match.go
index 7751035760..89e30d01a7 100644
--- a/src/testing/match.go
+++ b/src/testing/match.go
@@ -47,7 +47,7 @@ func newMatcher(matchString func(pat, str string) (bool, error), patterns, name
}
}
-func (m *matcher) fullName(c *common, subname string) (name string, ok bool) {
+func (m *matcher) fullName(c *common, subname string) (name string, ok, partial bool) {
name = subname
m.mu.Lock()
@@ -62,15 +62,16 @@ func (m *matcher) fullName(c *common, subname string) (name string, ok bool) {
// We check the full array of paths each time to allow for the case that
// a pattern contains a '/'.
- for i, s := range strings.Split(name, "/") {
+ elem := strings.Split(name, "/")
+ for i, s := range elem {
if i >= len(m.filter) {
break
}
if ok, _ := m.matchFunc(m.filter[i], s); !ok {
- return name, false
+ return name, false, false
}
}
- return name, true
+ return name, true, len(elem) < len(m.filter)
}
func splitRegexp(s string) []string {