Skip to content

refactor(runner): extract runtime error pattern scan#655

Merged
Chemaclass merged 1 commit into
mainfrom
refactor/runner-extract-assertion-snapshots
May 3, 2026
Merged

refactor(runner): extract runtime error pattern scan#655
Chemaclass merged 1 commit into
mainfrom
refactor/runner-extract-assertion-snapshots

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 Background

Iter 2 of the run_test slim-down. The function still inlined a 23-pattern case loop that scanned the captured runtime output for known shell errors.

💡 Changes

  • Extract bashunit::runner::detect_runtime_error <runtime_output> — returns the cleaned error string (or empty) so the call site is a single line
  • Pure extraction; the existing acceptance suite (bashunit_execution_error_test.sh, bashunit_syntax_error_test.sh) covers the path

Move the 23-error pattern scan inside `bashunit::runner::run_test` into
its own helper `bashunit::runner::detect_runtime_error`. Pure extraction.
@Chemaclass Chemaclass added the refactoring Refactoring or cleaning related label May 3, 2026
@Chemaclass Chemaclass self-assigned this May 3, 2026
@Chemaclass Chemaclass merged commit 4a31f9f into main May 3, 2026
30 checks passed
@Chemaclass Chemaclass deleted the refactor/runner-extract-assertion-snapshots branch May 3, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Refactoring or cleaning related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant