Skip to content

Commit

Permalink
Support a --quiet option in the test-suite.
Browse files Browse the repository at this point in the history
This shuts down the "*  ok ##: `test description`" messages.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Pierre Habouzit authored and Junio C Hamano committed Oct 25, 2007
1 parent 55db1df commit 1ece127
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ do
exit 0 ;;
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
verbose=t; shift ;;
-q|--q|--qu|--qui|--quie|--quiet)
quiet=t; shift ;;
--no-color)
color=; shift ;;
--no-python)
Expand All @@ -97,14 +99,15 @@ if test -n "$color"; then
skip) tput bold; tput setaf 2;; # bold green
pass) tput setaf 2;; # green
info) tput setaf 3;; # brown
*);;
*) test -n "$quiet" && return;;
esac
shift
echo "* $*"
tput sgr0
}
else
say_color() {
test -z "$1" && test -n "$quiet" && return
shift
echo "* $*"
}
Expand Down

0 comments on commit 1ece127

Please sign in to comment.