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>
maint
Miklos Vajna 2008-10-10 00:07:10 +02:00 committed by Shawn O. Pearce
parent 838cd34664
commit b8eecafd88
1 changed files with 2 additions and 1 deletions

View File

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