From: Joel Rosdahl Date: Wed, 20 Jul 2022 20:53:25 +0000 (+0200) Subject: test: Fix printing of error messages with embedded newlines X-Git-Tag: v4.6.2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2406c178a0659d21ac44f506eaaaa5405961c78f;p=thirdparty%2Fccache.git test: Fix printing of error messages with embedded newlines (cherry picked from commit 4b15d706691c2bef424888753dc98e4f5e1a3af3) --- diff --git a/test/run b/test/run index 72235791f..1e381b35a 100755 --- a/test/run +++ b/test/run @@ -33,19 +33,19 @@ if [[ -t 1 ]]; then fi green() { - printf "$ansi_boldgreen%s$ansi_reset\n" "$*" + echo -e "$ansi_boldgreen$*$ansi_reset" } red() { - printf "$ansi_boldred%s$ansi_reset\n" "$*" + echo -e "$ansi_boldred$*$ansi_reset" } yellow() { - printf "$ansi_boldyellow%s$ansi_reset\n" "$*" + echo -e "$ansi_boldyellow$*$ansi_reset" } bold() { - printf "$ansi_bold%s$ansi_reset\n" "$*" + echo -e "$ansi_bold$*$ansi_reset" } test_failed_internal() {