summaryrefslogtreecommitdiff
path: root/tests/test_files.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_files.py')
-rw-r--r--tests/test_files.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_files.py b/tests/test_files.py
index 9e49628d..29bd9a0d 100644
--- a/tests/test_files.py
+++ b/tests/test_files.py
@@ -230,10 +230,18 @@ def globs_to_regex_params(
matches=["foo", "hello/foo", "hi/there/foo"],
nomatches=["foob", "hello/foob", "hello/Foo"],
),
+ globs_to_regex_params(
+ ["a+b/foo*", "x{y}z/foo*"],
+ matches=["a+b/foo", "a+b/foobar", "x{y}z/foobar"],
+ nomatches=["aab/foo", "ab/foo", "xyz/foo"],
+ ),
]))
)
def test_globs_to_regex(patterns, case_insensitive, partial, text, result):
regex = globs_to_regex(patterns, case_insensitive=case_insensitive, partial=partial)
+ print(patterns)
+ print(regex)
+ print(text)
assert bool(regex.match(text)) == result
@@ -243,8 +251,6 @@ def test_globs_to_regex(patterns, case_insensitive, partial, text, result):
("*****/foo.py", "*****"),
("Hello]there", "]"),
("Hello[there", "["),
- ("Hello+there", "+"),
- ("{a,b}c", "{"),
("x/a**/b.py", "a**"),
("x/abcd**/b.py", "abcd**"),
("x/**a/b.py", "**a"),