Skip to content

Commit 7bc0911

Browse files
committed
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 <[email protected]>
1 parent d0f1ea6 commit 7bc0911

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/test-lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ else
169169
say_color() {
170170
test -z "$1" && test -n "$quiet" && return
171171
shift
172-
echo "$*"
172+
printf "%s\n" "$*"
173173
}
174174
fi
175175

0 commit comments

Comments
 (0)