From 2406c178a0659d21ac44f506eaaaa5405961c78f Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 20 Jul 2022 22:53:25 +0200 Subject: [PATCH] test: Fix printing of error messages with embedded newlines (cherry picked from commit 4b15d706691c2bef424888753dc98e4f5e1a3af3) --- test/run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() { -- 2.47.2