summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/collector/grep_test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/collector/grep_test.py b/tests/unit/collector/grep_test.py
index e5d5f8c6..2d4079af 100644
--- a/tests/unit/collector/grep_test.py
+++ b/tests/unit/collector/grep_test.py
@@ -21,7 +21,9 @@ def logfile(data_root):
@pytest.mark.parametrize("regex,expected", [
('not exist', []),
('Lorem (\S+)', [{'groups': ('ipsum',), 'groupdict': {}}]),
- ('nisi ut (?P<name>\S+)', [{'groups': ('aliquip',), 'groupdict': {'name': 'aliquip'}}])
+ ('nisi ut (?P<name>\S+)', [{'groups': ('aliquip',), 'groupdict': {'name': 'aliquip'}}]),
+ ('Lorem\s(\w+)\s.+\nconsectetur\s(\w+)\s.+\n',
+ [{'groups': ('ipsum', 'adipiscing',), 'groupdict': {}}])
])
def test_grep_in_file(logfile, regex, expected):
matches = grep_in_file(logfile, regex)