From: Miklos Vajna Date: Thu, 9 Oct 2008 22:07:10 +0000 (+0200) Subject: test-lib: fix color reset in say_color() X-Git-Tag: v1.6.0.3~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b8eecafd888d219633f4c29e8b6a90fc21a46dfd;p=git.git test-lib: fix color reset in say_color() When executing a single test with colors enabled, the cursor was not set back to the previous one, and you had to hit an extra enter to get it back. Work around this problem by calling 'tput sgr0' before printing the final newline. Signed-off-by: Miklos Vajna Signed-off-by: Shawn O. Pearce --- diff --git a/t/test-lib.sh b/t/test-lib.sh index 11c027571..35698361b 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -112,8 +112,9 @@ if test -n "$color"; then *) test -n "$quiet" && return;; esac shift - echo "* $*" + printf "* $*" tput sgr0 + echo ) } else