Skip to content

Commit fae74a0

Browse files
committed
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>
1 parent 7fd3ef1 commit fae74a0

10 files changed

+15
-15
lines changed

t/lib-git-svn.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ git_svn_id=git""-svn-id
55

66
if test -n "$NO_SVN_TESTS"
77
then
8-
test_expect_success 'skipping git svn tests, NO_SVN_TESTS defined' :
8+
say 'skipping git svn tests, NO_SVN_TESTS defined'
99
test_done
1010
exit
1111
fi
@@ -17,7 +17,7 @@ SVN_TREE=$GIT_SVN_DIR/svn-tree
1717
svn >/dev/null 2>&1
1818
if test $? -ne 1
1919
then
20-
test_expect_success 'skipping git svn tests, svn not found' :
20+
say 'skipping git svn tests, svn not found'
2121
test_done
2222
exit
2323
fi
@@ -41,7 +41,7 @@ then
4141
else
4242
err='Perl SVN libraries not found or unusable, skipping test'
4343
fi
44-
test_expect_success "$err" :
44+
say "$err"
4545
test_done
4646
exit
4747
fi

t/t0024-crlf-archive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test_expect_success 'tar archive' '
2828

2929
"$UNZIP" -v >/dev/null 2>&1
3030
if [ $? -eq 127 ]; then
31-
echo "Skipping ZIP test, because unzip was not found"
31+
say "Skipping ZIP test, because unzip was not found"
3232
test_done
3333
exit
3434
fi

t/t3600-rm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ test_expect_success \
112112
'test_must_fail git rm -f baz'
113113
chmod 775 .
114114
else
115-
test_expect_success 'skipping removal failure (perhaps running as root?)' :
115+
say 'skipping removal failure test (perhaps running as root?)'
116116
fi
117117

118118
test_expect_success \

t/t5000-tar-tree.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ test_expect_success 'git archive --format=zip with --output' \
182182

183183
$UNZIP -v >/dev/null 2>&1
184184
if [ $? -eq 127 ]; then
185-
echo "Skipping ZIP tests, because unzip was not found"
185+
say "Skipping ZIP tests, because unzip was not found"
186186
test_done
187187
exit
188188
fi

t/t7004-tag.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ test_expect_success \
582582
# subsequent tests require gpg; check if it is available
583583
gpg --version >/dev/null
584584
if [ $? -eq 127 ]; then
585-
echo "gpg not found - skipping tag signing and verification tests"
585+
say "gpg not found - skipping tag signing and verification tests"
586586
test_done
587587
exit
588588
fi
@@ -614,7 +614,7 @@ test_expect_success \
614614
# that version, creation of signed tags using the generated key fails.
615615
case "$(gpg --version)" in
616616
'gpg (GnuPG) 1.0.6'*)
617-
echo "Skipping signed tag tests, because a bug in 1.0.6 version"
617+
say "Skipping signed tag tests, because a bug in 1.0.6 version"
618618
test_done
619619
exit
620620
;;

t/t9200-git-cvsexportcommit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test_description='Test export of commits to CVS'
99
cvs >/dev/null 2>&1
1010
if test $? -ne 1
1111
then
12-
test_expect_success 'skipping git cvsexportcommit tests, cvs not found' :
12+
say 'skipping git cvsexportcommit tests, cvs not found'
1313
test_done
1414
exit
1515
fi

t/t9400-git-cvsserver-server.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ cvs CLI client via git-cvsserver server'
1313
cvs >/dev/null 2>&1
1414
if test $? -ne 1
1515
then
16-
test_expect_success 'skipping git-cvsserver tests, cvs not found' :
16+
say 'skipping git-cvsserver tests, cvs not found'
1717
test_done
1818
exit
1919
fi
2020
perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
21-
test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :
21+
say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
2222
test_done
2323
exit
2424
}

t/t9401-git-cvsserver-crlf.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ not_present() {
4949
cvs >/dev/null 2>&1
5050
if test $? -ne 1
5151
then
52-
test_expect_success 'skipping git-cvsserver tests, cvs not found' :
52+
say 'skipping git-cvsserver tests, cvs not found'
5353
test_done
5454
exit
5555
fi
5656
perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
57-
test_expect_success 'skipping git-cvsserver tests, Perl SQLite interface unavailable' :
57+
say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
5858
test_done
5959
exit
6060
}

t/t9500-gitweb-standalone-no-errors.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ safe_chmod () {
7474
. ./test-lib.sh
7575

7676
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
77-
test_expect_success 'skipping gitweb tests, perl version is too old' :
77+
say 'skipping gitweb tests, perl version is too old'
7878
test_done
7979
exit
8080
}

t/t9700-perl-git.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test_description='perl interface (Git.pm)'
77
. ./test-lib.sh
88

99
perl -MTest::More -e 0 2>/dev/null || {
10-
say_color skip "Perl Test::More unavailable, skipping test"
10+
say "Perl Test::More unavailable, skipping test"
1111
test_done
1212
}
1313

0 commit comments

Comments
 (0)