Skip to content

Commit

Permalink
Test script: fix check for "run/compile" button
Browse files Browse the repository at this point in the history
  • Loading branch information
gusthoff committed Aug 11, 2024
1 parent 89d4cc9 commit 043efa0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/py_modules/code_projects/check_code_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand All @@ -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

Expand Down

0 comments on commit 043efa0

Please sign in to comment.