From fac9e89cce6a46b96613d78f35549d3f5f7e7f29 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Fri, 3 Mar 2023 23:04:59 +0200 Subject: [PATCH] fix syntax tests for partial symbols not being recognized --- plugins/syntaxtest_dev.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/plugins/syntaxtest_dev.py b/plugins/syntaxtest_dev.py index 870a959e..7c07230e 100644 --- a/plugins/syntaxtest_dev.py +++ b/plugins/syntaxtest_dev.py @@ -30,11 +30,18 @@ syntax_test_header_regex = re.compile( - r'^(?P\s*.+?)' - r'\s+SYNTAX TEST\s+' - r'(?P(?:partial-symbols|(?:reindent(?:-un(?:indented|changed))?)\s+)*)' - r'"(?P[^"]+)"' - r'\s*(?P\S+)?$' + r''' + ^(?P\s*.+?) + \s+SYNTAX[ ]TEST\s+ + (?P(?: + (?: + partial-symbols + | (?:reindent(?:-un(?:indented|changed))?) + )\s+)* + ) + "(?P[^"]+)"\s* + (?P\S+)?$''', + re.X )