diff --git a/tests/scripts/generate_test_code.py b/tests/scripts/generate_test_code.py index 2468063d1..77e235dec 100755 --- a/tests/scripts/generate_test_code.py +++ b/tests/scripts/generate_test_code.py @@ -184,7 +184,7 @@ BEGIN_CASE_REGEX = r'/\*\s*BEGIN_CASE\s*(?P.*?)\s*\*/' END_CASE_REGEX = r'/\*\s*END_CASE\s*\*/' DEPENDENCY_REGEX = r'depends_on:(?P.*)' -C_IDENTIFIER_REGEX = r'!?[a-z_][a-z0-9_]*' +C_IDENTIFIER_REGEX = r'!?[a-z_][a-z0-9_]*$' TEST_FUNCTION_VALIDATION_REGEX = r'\s*void\s+(?P\w+)\s*\(' INT_CHECK_REGEX = r'int\s+.*' CHAR_CHECK_REGEX = r'char\s*\*\s*.*' @@ -1133,5 +1133,5 @@ if __name__ == "__main__": try: main() except GeneratorInputError as err: - print("%s: input error: %s" % - (os.path.basename(sys.argv[0]), str(err))) + sys.exit("%s: input error: %s" % + (os.path.basename(sys.argv[0]), str(err)))