aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-11 10:40:36 -0700
committerJunio C Hamano <gitster@pobox.com>2012-10-11 10:40:36 -0700
commit7bc0911d037f0a144d8c227f58693da0c9c77b2a (patch)
treeae96192e89c8cda657cb4c76220346f06e6e3589 /t
parentd0f1ea6003d97e63110fa7d50bb07f546a909b6e (diff)
downloadgit-7bc0911d037f0a144d8c227f58693da0c9c77b2a.tar.gz
git-7bc0911d037f0a144d8c227f58693da0c9c77b2a.tar.xz
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')
-rw-r--r--t/test-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index c0d04c494..280b3aa1f 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