[meld] test_filediff: New test cases for text filtering test
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] test_filediff: New test cases for text filtering test
- Date: Fri, 22 Jan 2016 23:21:41 +0000 (UTC)
commit 58aba8a12c710bd6819cc2df892c78d6fbbd55a6
Author: David Rabel <David Rabel NoreSoft com>
Date: Thu Dec 24 13:48:40 2015 +0100
test_filediff: New test cases for text filtering test
test/test_filediff.py | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/test/test_filediff.py b/test/test_filediff.py
index 0e605e2..d3f8aca 100644
--- a/test/test_filediff.py
+++ b/test/test_filediff.py
@@ -40,11 +40,27 @@ from meld.filters import FilterEntry
"# asdasdasdasdsab",
[(0, 17)],
),
+ # Matching with and without groups, with partially overlapping filters
+ (
+ "/*a*/ub",
+ [(0, 6)],
+ ),
# Non-matching with groups
(
"xasdyasdx",
[],
),
+ # Multiple lines with non-overlapping filters
+ (
+ "#ab\na2b",
+ [(0, 3), (5, 6)],
+ ),
+ # CVS keyword
+ (
+ "$Author: John Doe $",
+ [(8, 18)],
+ ),
+
])
def test_filter_text(text, ignored_ranges):
filter_patterns = [
@@ -52,6 +68,7 @@ def test_filter_text(text, ignored_ranges):
'/\*.*\*/',
'a(.*)b',
'x(.*)y(.*)z',
+ '\$\w+:([^\n$]+)\$'
]
filters = [
FilterEntry.new_from_gsetting(("name", True, f), FilterEntry.REGEX)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]