diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-10-11 10:40:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-11 10:40:36 -0700 |
commit | 7bc0911d037f0a144d8c227f58693da0c9c77b2a (patch) | |
tree | ae96192e89c8cda657cb4c76220346f06e6e3589 /t/test-lib.sh | |
parent | d0f1ea6003d97e63110fa7d50bb07f546a909b6e (diff) | |
download | git-7bc0911d037f0a144d8c227f58693da0c9c77b2a.tar.gz |
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>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index c0d04c494a..280b3aa1f7 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -169,7 +169,7 @@ else say_color() { test -z "$1" && test -n "$quiet" && return shift - echo "$*" + printf "%s\n" "$*" } fi |