From 9f07a280653330fe09c0d41fd9938ae08d6ca980 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Thu, 27 Jul 2023 21:11:08 +0100 Subject: [PATCH] Formatting fix for short multiline test output on wide terminals --- autoconf/scripts/run-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoconf/scripts/run-test.sh b/autoconf/scripts/run-test.sh index 649df5c..14a552f 100755 --- a/autoconf/scripts/run-test.sh +++ b/autoconf/scripts/run-test.sh @@ -164,7 +164,7 @@ for testScript in ${selectedTests}; do # current line, if there's space, or the next line, with each line # prefixed with the test number. if test -n "${testOutput}"; then - if test "${#testOutput}" -lt "${colsRemaining}"; then + if test "${#testOutput}" -lt "${colsRemaining}" && ! test "$(echo "${testOutput}" | wc -l | tr -dc '0-9')" -gt 1 2>/dev/null; then printf " - %s" "${testOutput}" else printf "\n%s" "$(echo "${testOutput}" | sed "s,^,$(printf "%${testCountWidth}d/%d: - " "${testNumber}" "${numberOfTests}"),")"