Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-10-10 02:07:10 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-10 19:01:40 +0400
commitb8eecafd888d219633f4c29e8b6a90fc21a46dfd (patch)
treef51ae90a6e733d702f5a7e1be3ff506b4f951c4c /t
parent838cd34664422863096f1a089f779bed1f00edf6 (diff)
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 <vmiklos@frugalware.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 't')
-rw-r--r--t/test-lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 11c027571b..35698361ba 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