diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-07-07 11:18:44 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-07-07 11:18:44 -0700 |
commit | 2a16315031cf478601ea150f7861d4f86b1350a2 (patch) | |
tree | a7bdc4b0d4cc28640a55a7689c0cccefecb3c642 /t/t9700/test.pl | |
parent | fcd91f8de20bf7969599a7a60cba73117d99f2d1 (diff) | |
parent | c9667456d201c435af523ffb7d583efd1784232a (diff) | |
download | git-2a16315031cf478601ea150f7861d4f86b1350a2.tar.gz git-2a16315031cf478601ea150f7861d4f86b1350a2.tar.xz |
Merge branch 'ab/tap'
* ab/tap:
t/README: document more test helpers
t/README: proposed rewording...
t/README: Document the do's and don'ts of tests
t/README: Add a section about skipping tests
t/README: Document test_expect_code
t/README: Document test_external*
t/README: Document the prereq functions, and 3-arg test_*
t/README: Typo: paralell -> parallel
t/README: The trash is in 't/trash directory.$name'
t/t9700/test.pl: don't access private object members, use public access methods
t9700: Use Test::More->builder, not $Test::Builder::Test
tests: Say "pass" rather than "ok" on empty lines for TAP
tests: Skip tests in a way that makes sense under TAP
test-lib: output a newline before "ok" under a TAP harness
test-lib: Make the test_external_* functions TAP-aware
test-lib: Adjust output to be valid TAP format
Diffstat (limited to 't/t9700/test.pl')
-rwxr-xr-x | t/t9700/test.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 666722d9b..671f38db2 100755 --- a/t/t9700/test.pl +++ b/t/t9700/test.pl @@ -7,6 +7,13 @@ use strict; use Test::More qw(no_plan); +BEGIN { + # t9700-perl-git.sh kicks off our testing, so we have to go from + # there. + Test::More->builder->current_test(1); + Test::More->builder->no_ending(1); +} + use Cwd; use File::Basename; @@ -105,3 +112,8 @@ my $last_commit = $r2->command_oneline(qw(rev-parse --verify HEAD)); like($last_commit, qr/^[0-9a-fA-F]{40}$/, 'rev-parse returned hash'); my $dir_commit = $r2->command_oneline('log', '-n1', '--pretty=format:%H', '.'); isnt($last_commit, $dir_commit, 'log . does not show last commit'); + +printf "1..%d\n", Test::More->builder->current_test; + +my $is_passing = eval { Test::More->is_passing }; +exit($is_passing ? 0 : 1) unless $@ =~ /Can't locate object method/; |