Correctly handle ^ and $ in ignore patterns (fixes #1365)
This commit is contained in:
@@ -62,6 +62,12 @@ var testcases = []testcase{
|
||||
{"**/foo.txt", "bar/baz/foo.txt", FNM_PATHNAME, true},
|
||||
|
||||
{"foo.txt", "foo.TXT", FNM_CASEFOLD, true},
|
||||
|
||||
// These characters are literals in glob, but not in regexp.
|
||||
{"hey$hello", "hey$hello", 0, true},
|
||||
{"hey^hello", "hey^hello", 0, true},
|
||||
{"hey{hello", "hey{hello", 0, true},
|
||||
{"hey}hello", "hey}hello", 0, true},
|
||||
}
|
||||
|
||||
func TestMatch(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user