Files
max-sixty__worktrunk/tests/fixtures/mixed-output.sh
Maximilian Roos bd23af821d Flush output after pre-merge commands
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.
2025-10-27 22:37:34 -07:00

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