diff options
Diffstat (limited to 'src/pkg/path/match_test.go')
-rw-r--r-- | src/pkg/path/match_test.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/pkg/path/match_test.go b/src/pkg/path/match_test.go index a1bf508e3..f377f1083 100644 --- a/src/pkg/path/match_test.go +++ b/src/pkg/path/match_test.go @@ -75,31 +75,3 @@ func TestMatch(t *testing.T) { } } } - -// contains returns true if vector contains the string s. -func contains(vector []string, s string) bool { - for _, elem := range vector { - if elem == s { - return true - } - } - return false -} - -var globTests = []struct { - pattern, result string -}{ - {"match.go", "match.go"}, - {"mat?h.go", "match.go"}, - {"*", "match.go"}, - {"../*/match.go", "../path/match.go"}, -} - -func TestGlob(t *testing.T) { - for _, tt := range globTests { - matches := Glob(tt.pattern) - if !contains(matches, tt.result) { - t.Errorf("Glob(%#q) = %#v want %v", tt.pattern, matches, tt.result) - } - } -} |