refactor(runner): extract subshell output type and formatter#656
Merged
Chemaclass merged 1 commit intomainfrom May 3, 2026
Merged
refactor(runner): extract subshell output type and formatter#656Chemaclass merged 1 commit intomainfrom
Chemaclass merged 1 commit intomainfrom
Conversation
Pull the `[type]line` decode block out of `bashunit::runner::run_test` into two pure helpers (`extract_subshell_type`, `format_subshell_output`). The `print_line` side effect stays at the call site so command substitution does not capture the user-facing output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 Background
Iter 3 of the
run_testslim-down. The[type]linedecode block was inline: parse the encoded type, replace[failed]/[skipped]/[incomplete]markers with newlines, then callprint_lineand reassign the local.💡 Changes
bashunit::runner::extract_subshell_type— pulls the[type]prefixbashunit::runner::format_subshell_output— strips markers and returns the cleaned linebashunit::state::print_lineside effect at the call site so command substitution does not capture user-facing output (regression caught locally during the parallel test run; fix preserved)