summaryrefslogtreecommitdiff
path: root/src/pkg/path/filepath/match_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/path/filepath/match_test.go')
-rw-r--r--src/pkg/path/filepath/match_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pkg/path/filepath/match_test.go b/src/pkg/path/filepath/match_test.go
index f1bc60e35..13108ce1e 100644
--- a/src/pkg/path/filepath/match_test.go
+++ b/src/pkg/path/filepath/match_test.go
@@ -65,6 +65,11 @@ var matchTests = []MatchTest{
{"[-x]", "a", false, ErrBadPattern},
{"\\", "a", false, ErrBadPattern},
{"[a-b-c]", "a", false, ErrBadPattern},
+ {"[", "a", false, ErrBadPattern},
+ {"[^", "a", false, ErrBadPattern},
+ {"[^bc", "a", false, ErrBadPattern},
+ {"a[", "a", false, nil},
+ {"a[", "ab", false, ErrBadPattern},
{"*x", "xxx", true, nil},
}