Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
test-lib: Fix say_color () not to interpret \a\b\c in the message
author
Junio C Hamano
<gitster@pobox.com>
Thu, 11 Oct 2012 17:40:36 +0000
(10:40 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 11 Oct 2012 17:40:36 +0000
(10:40 -0700)
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>
t/test-lib.sh
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
d0f1ea6
)
diff --git
a/t/test-lib.sh
b/t/test-lib.sh
index c0d04c494ae5892b539eed13f9717db27d1ec860..280b3aa1f77400594c0886842c4bd295e0306804 100644
(file)
--- 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