@matheusbsbs / matheus-bagliano / commits / fae74a04d7
Fork 0

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>

Johannes Sixt committed Mar 1, 2009 at 19:52 UTC fae74a04d75e820c5150cfb0cb4c044bf4488007
10 files changed +15 -15
t/lib-git-svn.sh
+3 -3
@@ -5,7 +5,7 @@ git_svn_id=git""-svn-id
5
6 if test -n "$NO_SVN_TESTS"
7 then
8 - test_expect_success 'skipping git svn tests, NO_SVN_TESTS defined' :
8 + say 'skipping git svn tests, NO_SVN_TESTS defined'
9 test_done
10 exit
11 fi
@@ -17,7 +17,7 @@ SVN_TREE=$GIT_SVN_DIR/svn-tree
17 svn >/dev/null 2>&1
18 if test $? -ne 1
19 then
20 - test_expect_success 'skipping git svn tests, svn not found' :
20 + say 'skipping git svn tests, svn not found'
21 test_done
22 exit
23 fi
@@ -41,7 +41,7 @@ then
41 else
42 err='Perl SVN libraries not found or unusable, skipping test'
43 fi
44 - test_expect_success "$err" :
44 + say "$err"
45 test_done
46 exit
47 fi
t/t0024-crlf-archive.sh
+1 -1
@@ -28,7 +28,7 @@ test_expect_success 'tar archive' '
28
29 "$UNZIP" -v >/dev/null 2>&1
30 if [ $? -eq 127 ]; then
31 - echo "Skipping ZIP test, because unzip was not found"
31 + say "Skipping ZIP test, because unzip was not found"
32 test_done
33 exit
34 fi
t/t3600-rm.sh
+1 -1
@@ -112,7 +112,7 @@ test_expect_success \
112 'test_must_fail git rm -f baz'
113 chmod 775 .
114 else
115 - test_expect_success 'skipping removal failure (perhaps running as root?)' :
115 + say 'skipping removal failure test (perhaps running as root?)'
116 fi
117
118 test_expect_success \
t/t5000-tar-tree.sh
+1 -1
@@ -182,7 +182,7 @@ test_expect_success 'git archive --format=zip with --output' \
182
183 $UNZIP -v >/dev/null 2>&1
184 if [ $? -eq 127 ]; then
185 - echo "Skipping ZIP tests, because unzip was not found"
185 + say "Skipping ZIP tests, because unzip was not found"
186 test_done
187 exit
188 fi
t/t7004-tag.sh
+2 -2
@@ -582,7 +582,7 @@ test_expect_success \
582 # subsequent tests require gpg; check if it is available
583 gpg --version >/dev/null
584 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"
586 test_done
587 exit
588 fi
@@ -614,7 +614,7 @@ test_expect_success \
614 # that version, creation of signed tags using the generated key fails.
615 case "$(gpg --version)" in
616 '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"
618 test_done
619 exit
620 ;;
t/t9200-git-cvsexportcommit.sh
+1 -1
@@ -9,7 +9,7 @@ test_description='Test export of commits to CVS'
9 cvs >/dev/null 2>&1
10 if test $? -ne 1
11 then
12 - test_expect_success 'skipping git cvsexportcommit tests, cvs not found' :
12 + say 'skipping git cvsexportcommit tests, cvs not found'
13 test_done
14 exit
15 fi
t/t9400-git-cvsserver-server.sh
+2 -2
@@ -13,12 +13,12 @@ cvs CLI client via git-cvsserver server'
13 cvs >/dev/null 2>&1
14 if test $? -ne 1
15 then
16 - test_expect_success 'skipping git-cvsserver tests, cvs not found' :
16 + say 'skipping git-cvsserver tests, cvs not found'
17 test_done
18 exit
19 fi
20 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'
22 test_done
23 exit
24 }
t/t9401-git-cvsserver-crlf.sh
+2 -2
@@ -49,12 +49,12 @@ not_present() {
49 cvs >/dev/null 2>&1
50 if test $? -ne 1
51 then
52 - test_expect_success 'skipping git-cvsserver tests, cvs not found' :
52 + say 'skipping git-cvsserver tests, cvs not found'
53 test_done
54 exit
55 fi
56 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'
58 test_done
59 exit
60 }
t/t9500-gitweb-standalone-no-errors.sh
+1 -1
@@ -74,7 +74,7 @@ safe_chmod () {
74 . ./test-lib.sh
75
76 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'
78 test_done
79 exit
80 }
t/t9700-perl-git.sh
+1 -1
@@ -7,7 +7,7 @@ test_description='perl interface (Git.pm)'
7 . ./test-lib.sh
8
9 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"
11 test_done
12 }
13