Skip to content

refactor(runner): extract login profile sourcing and verbose summary#653

Merged
Chemaclass merged 1 commit into
mainfrom
refactor/runner-extract-login-shell-source
May 3, 2026
Merged

refactor(runner): extract login profile sourcing and verbose summary#653
Chemaclass merged 1 commit into
mainfrom
refactor/runner-extract-login-shell-source

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 Background

bashunit::runner::run_test is ~320 lines with several self-contained side concerns inlined inside its subshell. Hard to navigate, hard to test in isolation.

💡 Changes

  • Extract bashunit::runner::source_login_shell_profiles — bundles the four [ -f ~/.bash* ] && source lines that the subshell ran when --login was active
  • Extract bashunit::runner::print_verbose_test_summary — bundles the verbose-mode header/printf scaffolding into a single helper that takes file/fn/duration/result
  • Pure extraction; no behavior change. End-to-end coverage already lives in tests/acceptance/bashunit_login_shell_test.sh

Split two self-contained blocks out of `bashunit::runner::run_test` into
named helpers (`source_login_shell_profiles`, `print_verbose_test_summary`)
so the hot path reads top-down. Pure extraction, no behavior change.
@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 6cec81b into main May 3, 2026
30 checks passed
@Chemaclass Chemaclass deleted the refactor/runner-extract-login-shell-source branch May 3, 2026 11:03
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