mirror of
https://github.com/max-sixty/worktrunk.git
synced 2026-09-14 20:00:38 +08:00
bd23af821d
Ensures all stdout and stderr from pre-merge check commands are displayed before `wt` prints its next progress or status message. This prevents interleaving `wt`'s own output with that of the pre-merge checks, ensuring a clear and ordered display in the terminal. Adds test helpers to capture combined stdout/stderr for snapshot testing and new integration tests to verify the output ordering behavior.
15 lines
316 B
Bash
Executable File
15 lines
316 B
Bash
Executable File
#!/bin/bash
|
|
# Test script that outputs to both stdout and stderr
|
|
# Usage: mixed-output.sh <name> <count>
|
|
|
|
NAME="${1:-test}"
|
|
COUNT="${2:-5}"
|
|
|
|
for i in $(seq 1 "$COUNT"); do
|
|
echo "[$NAME] stdout line $i"
|
|
echo "[$NAME] stderr line $i" >&2
|
|
done
|
|
|
|
echo "[$NAME] stdout complete"
|
|
echo "[$NAME] stderr complete" >&2
|