1
0
mirror of https://github.com/gilbertchen/duplicacy synced 2025-12-21 10:43:26 +00:00

Fixed a bug where filenames starting with i or e are mistakenly interpreted as regex

This commit is contained in:
Gilbert Chen
2019-04-07 22:43:36 -04:00
parent 43a5ffe011
commit abcb4d75c1
2 changed files with 12 additions and 1 deletions

View File

@@ -92,6 +92,17 @@ func TestMatchPattern(t *testing.T) {
}
}
for _, pattern := range []string{ "+", "-", "i:", "e:", "+a", "-a", "i:a", "e:a"} {
if IsUnspecifiedFilter(pattern) {
t.Errorf("pattern %s has a specified filter", pattern)
}
}
for _, pattern := range []string{ "i", "e", "ia", "ib", "a", "b"} {
if !IsUnspecifiedFilter(pattern) {
t.Errorf("pattern %s does not have a specified filter", pattern)
}
}
}
func TestRateLimit(t *testing.T) {