summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-09-28 22:59:08 +0000
committerSteve Peters <steve@fisharerojo.org>2005-09-28 22:59:08 +0000
commit73ea3450b2c8512de829cec5308e4cbe2a8cd9c5 (patch)
tree3dba4ef9c591ecd757c5407060a9c636872d6323 /lib
parent639f6c3d60ee2ae4935616e7c47c2288c4dd637d (diff)
downloadperl-73ea3450b2c8512de829cec5308e4cbe2a8cd9c5.tar.gz
Upgrade to Test::Harness 2.56
p4raw-id: //depot/perl@25649
Diffstat (limited to 'lib')
-rw-r--r--lib/Test/Harness.pm4
-rw-r--r--lib/Test/Harness/Changes24
-rw-r--r--lib/Test/Harness/Straps.pm12
-rw-r--r--lib/Test/Harness/TAP.pod1
-rw-r--r--lib/Test/Harness/bin/prove8
-rw-r--r--lib/Test/Harness/t/test-harness.t46
6 files changed, 71 insertions, 24 deletions
diff --git a/lib/Test/Harness.pm b/lib/Test/Harness.pm
index 05a3e1cf6c..a53049c5ba 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 cb6cf4f0dc..f9a8d340d7 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 59f8e603c3..d561ea4586 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 fa8047883e..6dd0a96cf2 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 ee62afbc3e..cd5b7045c1 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 d07c43243d..7a4e6b8e52 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, <<WARN );
-Enormous test number seen [test 100001]
-Can't detailize, too big.
+ my $expected_warnings = "";
+ if ( $test eq "bignum" ) {
+ $expected_warnings = <<WARN;
Enormous test number seen [test 136211425]
Can't detailize, too big.
WARN
-
}
-
- SKIP: {
- skip "bignum has known warnings", 1 if $test eq 'bignum';
- is( $warning, '' );
+ elsif ( $test eq 'bignum_many' ) {
+ $expected_warnings = <<WARN;
+Enormous test number seen [test 100001]
+Can't detailize, too big.
+WARN
}
-}
-}
+ my $desc = $expected_warnings ? 'Got proper warnings' : 'No warnings';
+ is( $warning, $expected_warnings, "$test - $desc" );
+} # taint SKIP block
+} # for tests