summaryrefslogtreecommitdiffhomepage
path: root/test/unit/check/regex.py
blob: 734c0150e4ade6aad2fc075800a2428a9aaeb76c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
import re
import subprocess


def check_regex(unitd):
    output = subprocess.check_output(
        [unitd, '--version'], stderr=subprocess.STDOUT
    )

    if re.search('--no-regex', output.decode()):
        return False

    return True