Correctly handle (?i) in ignores (fixes #1953)

This commit is contained in:
Jakob Borg
2015-09-02 20:54:18 +02:00
parent 70b37dc469
commit e3e1036dda
4 changed files with 21 additions and 27 deletions

View File

@@ -53,10 +53,6 @@ var testcases = []testcase{
{"**/foo.txt", "bar/baz/foo.txt", PathName, true},
{"foo.txt", "foo.TXT", CaseFold, true},
{"(?i)foo.txt", "foo.TXT", 0, true},
{"(?i)(?i)foo.txt", "foo.TXT", 0, true}, // repeated prefix should be fine
{"(?i)**foo.txt", "/dev/tmp/foo.TXT", 0, true},
{"(?i)!**foo.txt", "/dev/tmp/foo.TXT", 0, false},
// These characters are literals in glob, but not in regexp.
{"hey$hello", "hey$hello", 0, true},