From 043efa0cff69eebfa92b2fcbb5d76c88c63569ff Mon Sep 17 00:00:00 2001 From: gusthoff Date: Sun, 11 Aug 2024 17:53:23 +0200 Subject: [PATCH] Test script: fix check for "run/compile" button --- frontend/py_modules/code_projects/check_code_block.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/py_modules/code_projects/check_code_block.py b/frontend/py_modules/code_projects/check_code_block.py index 35f6ddfd4..1dc4a428e 100755 --- a/frontend/py_modules/code_projects/check_code_block.py +++ b/frontend/py_modules/code_projects/check_code_block.py @@ -460,8 +460,9 @@ def cleanup_project(language, project_filename, main_file): check_error = True if 'ada-expect-compile-error' in block.classes: - if not any(b in ['compile', 'run'] for b in block.buttons): - print_error(loc, "Expected compile or run button, got none!") + if (not (any(b in ['compile', 'run'] for b in block.buttons) or + any(c in ['ada-compile', 'ada-run'] for c in block.classes))): + print_error(loc, "Expected compile or run button/class, got none!") check_error = True if not compile_error: print_error(loc, "Expected compile error, got none!") @@ -479,7 +480,8 @@ def cleanup_project(language, project_filename, main_file): if (any (c in ['ada-run-expect-failure','ada-norun'] for c in block.classes) - and not 'run' in block.buttons): + and not ('run' in block.buttons or + 'ada-run' in block.classes)): print_error(loc, "Expected run button, got none!") check_error = True