Skip to content

Commit 58aba8a

Browse files
David Rabelkaiw
authored andcommitted
test_filediff: New test cases for text filtering test
1 parent 3528363 commit 58aba8a

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

test/test_filediff.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,35 @@
4040
"# asdasdasdasdsab",
4141
[(0, 17)],
4242
),
43+
# Matching with and without groups, with partially overlapping filters
44+
(
45+
"/*a*/ub",
46+
[(0, 6)],
47+
),
4348
# Non-matching with groups
4449
(
4550
"xasdyasdx",
4651
[],
4752
),
53+
# Multiple lines with non-overlapping filters
54+
(
55+
"#ab\na2b",
56+
[(0, 3), (5, 6)],
57+
),
58+
# CVS keyword
59+
(
60+
"$Author: John Doe $",
61+
[(8, 18)],
62+
),
63+
4864
])
4965
def test_filter_text(text, ignored_ranges):
5066
filter_patterns = [
5167
'#.*',
5268
'/\*.*\*/',
5369
'a(.*)b',
5470
'x(.*)y(.*)z',
71+
'\$\w+:([^\n$]+)\$'
5572
]
5673
filters = [
5774
FilterEntry.new_from_gsetting(("name", True, f), FilterEntry.REGEX)

0 commit comments

Comments
 (0)