blob: 09f4a004b185f6a33b2aa3eec1a1ff6fff613842 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import re
import pytest
from scripts.dev.ci import problemmatchers
@pytest.mark.parametrize('matcher_name', list(problemmatchers.MATCHERS))
def test_patterns(matcher_name):
"""Make sure all regexps are valid.
They aren't actually Python syntax, but hopefully close enough to it to compile with
Python's re anyways.
"""
for matcher in problemmatchers.MATCHERS[matcher_name]:
for pattern in matcher['pattern']:
regexp = pattern['regexp']
print(regexp)
re.compile(regexp)
|