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>
This commit is contained in:
Miklos Vajna 2008-10-10 00:07:10 +02:00 committed by Shawn O. Pearce
parent 838cd34664
commit b8eecafd88

View file

@ -112,8 +112,9 @@ if test -n "$color"; then
*) test -n "$quiet" && return;;
esac
shift
echo "* $*"
printf "* $*"
tput sgr0
echo
)
}
else