提交 570f3226 编写于 作者: M Michele Ballabio 提交者: Junio C Hamano

test-lib.sh: move error line after error() declaration

This patch removes a spurious "command not found" error
and actually makes the "Test script did not set test_description."
string follow the command line option "--no-color".
Signed-off-by: NMichele Ballabio <barra_cuda@katamail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 c899a57c
......@@ -66,9 +66,6 @@ esac
tput sgr0 >/dev/null 2>&1 &&
color=t
test "${test_description}" != "" ||
error "Test script did not set test_description."
while test "$#" -ne 0
do
case "$1" in
......@@ -77,8 +74,7 @@ do
-i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
immediate=t; shift ;;
-h|--h|--he|--hel|--help)
echo "$test_description"
exit 0 ;;
help=t; shift ;;
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
verbose=t; shift ;;
-q|--q|--qu|--qui|--quie|--quiet)
......@@ -124,6 +120,15 @@ say () {
say_color info "$*"
}
test "${test_description}" != "" ||
error "Test script did not set test_description."
if test "$help" = "t"
then
echo "$test_description"
exit 0
fi
exec 5>&1
if test "$verbose" = "t"
then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册