Support ✓/✗ as alternatives to [success]/[failure]

This commit is contained in:
Sven van Heugten 2026-04-16 17:01:40 +02:00
parent 4704cc088d
commit 0719fa33c2
No known key found for this signature in database
GPG key ID: D612F88666F4F660
3 changed files with 49 additions and 21 deletions

View file

@ -91,10 +91,10 @@ for commit_hash in "${commits[@]}"; do
if not line.strip():
continue
match = re.match(r"^\\[(success|failure)\\]\\s+(.+)$", line)
match = re.match(r"^(\\[success\\]|\\[failure\\]|✓|✗)\\s+(.+)$", line)
if match:
current_step = {
"expects_success": match.group(1) == "success",
"expects_success": match.group(1) in ("[success]", "✓"),
"command": match.group(2),
"assertions": [],
}
@ -104,7 +104,7 @@ for commit_hash in "${commits[@]}"; do
if current_step is None:
print(
f"DSL parse error on line {line_number}: "
"assertion text must follow [success] or [failure]."
"assertion text must follow [success], [failure], ✓, or ✗."
)
sys.exit(1)