test-lib: Fix say_color () not to interpret \a\b\c in the message
When running with color disabled (e.g. under prove to produce TAP output), say_color() helper function is defined to use echo to show the message. With a message that ends with "\c", echo is allowed to interpret it as "Do not end the line with LF". Use printf "%s\n" to emit the message literally. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Oct 11, 2012 at 10:40 UTC
7bc0911d037f0a144d8c227f58693da0c9c77b2a
1 file changed
+1
-1
t/test-lib.sh
+1
-1
@@ -169,7 +169,7 @@ else
169
say_color() {
170
test -z "$1" && test -n "$quiet" && return
171
shift
172
- echo "$*"
172
+ printf "%s\n" "$*"
173
}
174
fi
175