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>
Miklos Vajna committed
Oct 10, 2008 at 00:07 UTC
b8eecafd888d219633f4c29e8b6a90fc21a46dfd
1 file changed
+2
-1
t/test-lib.sh
+2
-1
@@ -112,8 +112,9 @@ if test -n "$color"; then
112
*) test -n "$quiet" && return;;
113
esac
114
shift
115
- echo "* $*"
115
+ printf "* $*"
116
tput sgr0
117
+ echo
118
)
119
}
120
else