summaryrefslogtreecommitdiffhomepage
path: root/test/unit/check/regex.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2021-02-18 21:21:55 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2021-02-18 21:21:55 +0000
commitaf3b6ef37d0d8d4d9e27d77a750419d96e0119bc (patch)
tree81a0b0ce05367abe3de3fe4990f2a575f2cb2d97 /test/unit/check/regex.py
parentecd0fc5d81541e1263a7cc35c632242e33c4082e (diff)
downloadunit-af3b6ef37d0d8d4d9e27d77a750419d96e0119bc.tar.gz
unit-af3b6ef37d0d8d4d9e27d77a750419d96e0119bc.tar.bz2
Tests: added regex check.
Diffstat (limited to '')
-rw-r--r--test/unit/check/regex.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/unit/check/regex.py b/test/unit/check/regex.py
new file mode 100644
index 00000000..734c0150
--- /dev/null
+++ b/test/unit/check/regex.py
@@ -0,0 +1,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