summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorPierre Habouzit <madcoder@debian.org>2007-10-24 20:03:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-10-25 05:44:14 (GMT)
commit1ece127467c1d65062f17777b1eedcd84fd9ea69 (patch)
tree571468655d1e2f21e8733db8365aaccd488d4264 /t/test-lib.sh
parent55db1df0c86b0fded61731647a8f1cd6e7dc9b04 (diff)
downloadgit-1ece127467c1d65062f17777b1eedcd84fd9ea69.zip
git-1ece127467c1d65062f17777b1eedcd84fd9ea69.tar.gz
git-1ece127467c1d65062f17777b1eedcd84fd9ea69.tar.bz2
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>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 66efcda..714de6e 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -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)
@@ -97,7 +99,7 @@ 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 "* $*"
@@ -105,6 +107,7 @@ if test -n "$color"; then
}
else
say_color() {
+ test -z "$1" && test -n "$quiet" && return
shift
echo "* $*"
}