diff options
Diffstat (limited to 'libgo/go/path/match_test.go')
-rw-r--r-- | libgo/go/path/match_test.go | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/libgo/go/path/match_test.go b/libgo/go/path/match_test.go index 141cff7da01..f377f1083b7 100644 --- a/libgo/go/path/match_test.go +++ b/libgo/go/path/match_test.go @@ -75,32 +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"}, - // Fails in the gccgo test environment. - // {"../*/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) - } - } -} |