Fix regex matching run_test calls in ssl-opt.sh

No descriptions were processed before due to bugs in the regex.

Support \" inside double-quoted strings.
This commit is contained in:
Gilles Peskine 2019-09-20 17:54:45 +02:00
parent 895868bc82
commit 168858f52d

View file

@ -92,7 +92,7 @@ def check_ssl_opt_sh(results, file_name):
# Assume that all run_test calls have the same simple form
# with the test description entirely on the same line as the
# function name.
m = re.match(r'\s+run_test\s+"([^"])"', line)
m = re.match(r'\s*run_test\s+"((?:[^\\"]|\\.)*)"', line)
if not m:
continue
description = m.group(1)