From: Steve Peters Date: Wed, 28 Sep 2005 22:59:08 +0000 (+0000) Subject: Upgrade to Test::Harness 2.56 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=73ea3450b2c8512de829cec5308e4cbe2a8cd9c5;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Test::Harness 2.56 p4raw-id: //depot/perl@25649 --- diff --git a/MANIFEST b/MANIFEST index c038ab4..f0c34a4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2732,6 +2732,7 @@ t/lib/Math/BigRat/Test.pm Math::BigRat test helper t/lib/NoExporter.pm Part of Test-Simple t/lib/sample-tests/bailout Test data for Test::Harness t/lib/sample-tests/bignum Test data for Test::Harness +t/lib/sample-tests/bignum_many Test data for Test::Harness t/lib/sample-tests/combined Test data for Test::Harness t/lib/sample-tests/descriptive Test data for Test::Harness t/lib/sample-tests/die Test data for Test::Harness diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm index 05a3e1c..a53049c 100644 --- a/lib/Test/Harness.pm +++ b/lib/Test/Harness.pm @@ -35,11 +35,11 @@ Test::Harness - Run Perl standard test scripts with statistics =head1 VERSION -Version 2.52 +Version 2.56 =cut -$VERSION = "2.52"; +$VERSION = "2.56"; # Backwards compatibility for exportable variable names. *verbose = *Verbose; diff --git a/lib/Test/Harness/Changes b/lib/Test/Harness/Changes index cb6cf4f..f9a8d34 100644 --- a/lib/Test/Harness/Changes +++ b/lib/Test/Harness/Changes @@ -1,5 +1,29 @@ Revision history for Perl extension Test::Harness +2.56 Wed Sep 28 16:04:00 CDT 2005 + [FIXES] + * Incorporate bleadperl patch to fix Test::Harness on VMS. + +2.54 Wed Sep 28 09:52:19 CDT 2005 + [FIXES] + * Test counts were wrong, so wouldn't install on Perls < 5.8.0. + +2.53_02 Thu Aug 25 21:37:01 CDT 2005 + [FIXES] + * File order in prove is now sorted within the directory. It's not + the sorting that's important as much as the deterministic results. + Thanks to Adam Kennedy and Casey West for pointing this out, + independently of each other, with 12 hours of the other. + + [INTERNALS] + * Fix calls to podusage() to not use the DATA typeglob. Thanks sungo. + +2.53_01 Sun Jul 10 10:45:27 CDT 2005 + [FIXES] + * If we go over 100,000 tests, it used to print out a warning for + every test over 100,000. Now, we stop after the first. Thanks to + Sebastien Aperghis-Tramoni. + 2.52 Sun Jun 26 23:05:19 CDT 2005 No changes diff --git a/lib/Test/Harness/Straps.pm b/lib/Test/Harness/Straps.pm index 59f8e60..d561ea4 100644 --- a/lib/Test/Harness/Straps.pm +++ b/lib/Test/Harness/Straps.pm @@ -3,7 +3,7 @@ package Test::Harness::Straps; use strict; use vars qw($VERSION); -$VERSION = '0.23'; +$VERSION = '0.26'; use Config; use Test::Harness::Assert; @@ -185,9 +185,11 @@ sub _analyze_line { $totals->{ok}++ if $point->pass; - if ( ($point->number > 100000) && ($point->number > $self->{max}) ) { - warn "Enormous test number seen [test ", $point->number, "]\n"; - warn "Can't detailize, too big.\n"; + if ( ($point->number > 100_000) && ($point->number > ($self->{max}||100_000)) ) { + if ( !$self->{too_many_tests}++ ) { + warn "Enormous test number seen [test ", $point->number, "]\n"; + warn "Can't detailize, too big.\n"; + } } else { my $details = { @@ -602,7 +604,7 @@ etc. so it's ready to parse the next file. sub _reset_file_state { my($self) = shift; - delete @{$self}{qw(max skip_all todo)}; + delete @{$self}{qw(max skip_all todo too_many_tests)}; $self->{line} = 0; $self->{saw_header} = 0; $self->{saw_bailout}= 0; diff --git a/lib/Test/Harness/TAP.pod b/lib/Test/Harness/TAP.pod index fa80478..6dd0a96 100644 --- a/lib/Test/Harness/TAP.pod +++ b/lib/Test/Harness/TAP.pod @@ -200,6 +200,7 @@ ignore, at least as far as analyzing the test results. The harness is free, however, to display the diagnostics. Typically diagnostics are used to provide information about the environment in which test file is running, or to delineate a group of tests. + ... ok 18 - Closed database connection # End of database section. diff --git a/lib/Test/Harness/bin/prove b/lib/Test/Harness/bin/prove index ee62afb..cd5b704 100644 --- a/lib/Test/Harness/bin/prove +++ b/lib/Test/Harness/bin/prove @@ -32,8 +32,8 @@ GetOptions( 'b|blib' => \$blib, 'd|debug' => \$Test::Harness::debug, 'D|dry' => \$dry, - 'h|help|?' => sub {pod2usage({-verbose => 1, -input => \*DATA}); exit}, - 'H|man' => sub {pod2usage({-verbose => 2, -input => \*DATA}); exit}, + 'h|help|?' => sub {pod2usage({-verbose => 1}); exit}, + 'H|man' => sub {pod2usage({-verbose => 2}); exit}, 'I=s@' => \@includes, 'l|lib' => \$lib, 'r|recurse' => \$recurse, @@ -96,7 +96,9 @@ sub all_in { local *DH; if ( opendir( DH, $start ) ) { - while ( my $file = readdir DH ) { + my @files = sort readdir DH; + closedir DH; + for my $file ( @files ) { next if $file eq File::Spec->updir || $file eq File::Spec->curdir; next if $file eq ".svn"; next if $file eq "CVS"; diff --git a/lib/Test/Harness/t/test-harness.t b/lib/Test/Harness/t/test-harness.t index d07c432..7a4e6b8 100644 --- a/lib/Test/Harness/t/test-harness.t +++ b/lib/Test/Harness/t/test-harness.t @@ -417,6 +417,24 @@ my %samples = ( }, all_ok => 0, }, + bignum_many => { + total => { + bonus => 0, + max => 2, + 'ok' => 11, + files => 1, + bad => 1, + good => 0, + tests => 1, + sub_skipped=> 0, + 'todo' => 0, + skipped => 0, + }, + failed => { + canon => '3-100000', + }, + all_ok => 0, + }, 'shbang_misparse' => { total => { bonus => 0, @@ -469,7 +487,7 @@ my %samples = ( }, ); -plan tests => (keys(%samples) * 8); +plan tests => (keys(%samples) * 7); use Test::Harness; my @_INC = map { qq{"-I$_"} } @INC; @@ -479,7 +497,7 @@ tie *NULL, 'Dev::Null' or die $!; for my $test ( sort keys %samples ) { SKIP: { - skip "-t introduced in 5.8.0", 8 if $test eq 'taint_warn' and $] < 5.008; + skip "-t introduced in 5.8.0", 7 if $test eq 'taint_warn' and $] < 5.008; my $expect = $samples{$test}; @@ -520,20 +538,20 @@ SKIP: { "$test - failed" ); } - SKIP: { - skip "special tests for bignum", 1 unless $test eq 'bignum'; - is( $warning, <