@matheusbsbs / matheus-bagliano / commits / 1ece127467
Fork 0

Support a --quiet option in the test-suite.

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>

Pierre Habouzit committed Oct 24, 2007 at 22:03 UTC 1ece127467c1d65062f17777b1eedcd84fd9ea69
1 file changed +4 -1
t/test-lib.sh
+4 -1
@@ -80,6 +80,8 @@ do
80 exit 0 ;;
81 -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
82 verbose=t; shift ;;
83 + -q|--q|--qu|--qui|--quie|--quiet)
84 + quiet=t; shift ;;
85 --no-color)
86 color=; shift ;;
87 --no-python)
@@ -97,7 +99,7 @@ if test -n "$color"; then
99 skip) tput bold; tput setaf 2;; # bold green
100 pass) tput setaf 2;; # green
101 info) tput setaf 3;; # brown
100 - *);;
102 + *) test -n "$quiet" && return;;
103 esac
104 shift
105 echo "* $*"
@@ -105,6 +107,7 @@ if test -n "$color"; then
107 }
108 else
109 say_color() {
110 + test -z "$1" && test -n "$quiet" && return
111 shift
112 echo "* $*"
113 }