test suite: Use 'say' to say something instead of 'test_expect_success'

Some tests report that some tests will be skipped.  They used
'test_expect_success' with a trivially successful test.  Nowadays we have
the helper function 'say' for this purpose.

In on case, 'say_color skip' is replaced by 'say' because the former is
not intended as a public API.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
This commit is contained in:
Johannes Sixt 2009-03-01 19:52:51 +01:00
parent 7fd3ef1fd7
commit fae74a04d7
10 changed files with 15 additions and 15 deletions

View file

@ -5,7 +5,7 @@ git_svn_id=git""-svn-id
if test -n "$NO_SVN_TESTS"
then
test_expect_success 'skipping git svn tests, NO_SVN_TESTS defined' :
say 'skipping git svn tests, NO_SVN_TESTS defined'
test_done
exit
fi
@ -17,7 +17,7 @@ SVN_TREE=$GIT_SVN_DIR/svn-tree
svn >/dev/null 2>&1
if test $? -ne 1
then
test_expect_success 'skipping git svn tests, svn not found' :
say 'skipping git svn tests, svn not found'
test_done
exit
fi
@ -41,7 +41,7 @@ then
else
err='Perl SVN libraries not found or unusable, skipping test'
fi
test_expect_success "$err" :
say "$err"
test_done
exit
fi

View file

@ -28,7 +28,7 @@ test_expect_success 'tar archive' '
"$UNZIP" -v >/dev/null 2>&1
if [ $? -eq 127 ]; then
echo "Skipping ZIP test, because unzip was not found"
say "Skipping ZIP test, because unzip was not found"
test_done
exit
fi

View file

@ -112,7 +112,7 @@ test_expect_success \
'test_must_fail git rm -f baz'
chmod 775 .
else
test_expect_success 'skipping removal failure (perhaps running as root?)' :
say 'skipping removal failure test (perhaps running as root?)'
fi
test_expect_success \

View file

@ -182,7 +182,7 @@ test_expect_success 'git archive --format=zip with --output' \
$UNZIP -v >/dev/null 2>&1
if [ $? -eq 127 ]; then
echo "Skipping ZIP tests, because unzip was not found"
say "Skipping ZIP tests, because unzip was not found"
test_done
exit
fi

View file

@ -582,7 +582,7 @@ test_expect_success \
# subsequent tests require gpg; check if it is available
gpg --version >/dev/null
if [ $? -eq 127 ]; then
echo "gpg not found - skipping tag signing and verification tests"
say "gpg not found - skipping tag signing and verification tests"
test_done
exit
fi
@ -614,7 +614,7 @@ test_expect_success \
# that version, creation of signed tags using the generated key fails.
case "$(gpg --version)" in
'gpg (GnuPG) 1.0.6'*)
echo "Skipping signed tag tests, because a bug in 1.0.6 version"
say "Skipping signed tag tests, because a bug in 1.0.6 version"
test_done
exit
;;

View file

@ -9,7 +9,7 @@ test_description='Test export of commits to CVS'
cvs >/dev/null 2>&1
if test $? -ne 1
then
test_expect_success 'skipping git cvsexportcommit tests, cvs not found' :
say 'skipping git cvsexportcommit tests, cvs not found'
test_done
exit
fi

View file

@ -13,12 +13,12 @@ cvs CLI client via git-cvsserver server'
cvs >/dev/null 2>&1
if test $? -ne 1
then
test_expect_success 'skipping git-cvsserver tests, cvs not found' :
say 'skipping git-cvsserver tests, cvs not found'
test_done
exit
fi
perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :
say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
test_done
exit
}

View file

@ -49,12 +49,12 @@ not_present() {
cvs >/dev/null 2>&1
if test $? -ne 1
then
test_expect_success 'skipping git-cvsserver tests, cvs not found' :
say 'skipping git-cvsserver tests, cvs not found'
test_done
exit
fi
perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :
say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
test_done
exit
}

View file

@ -74,7 +74,7 @@ safe_chmod () {
. ./test-lib.sh
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
test_expect_success 'skipping gitweb tests, perl version is too old' :
say 'skipping gitweb tests, perl version is too old'
test_done
exit
}

View file

@ -7,7 +7,7 @@ test_description='perl interface (Git.pm)'
. ./test-lib.sh
perl -MTest::More -e 0 2>/dev/null || {
say_color skip "Perl Test::More unavailable, skipping test"
say "Perl Test::More unavailable, skipping test"
test_done
}