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
=head1 VERSION
-Version 2.52
+Version 2.56
=cut
-$VERSION = "2.52";
+$VERSION = "2.56";
# Backwards compatibility for exportable variable names.
*verbose = *Verbose;
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
use strict;
use vars qw($VERSION);
-$VERSION = '0.23';
+$VERSION = '0.26';
use Config;
use Test::Harness::Assert;
$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 = {
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;
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.
'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,
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";
},
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,
},
);
-plan tests => (keys(%samples) * 8);
+plan tests => (keys(%samples) * 7);
use Test::Harness;
my @_INC = map { qq{"-I$_"} } @INC;
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};
"$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
1..2
ok 1
ok 2
-ok 100001
ok 136211425
+ok 136211426
DUMMY
--- /dev/null
+print <<DUMMY;
+1..2
+ok 1
+ok 2
+ok 99997
+ok 99998
+ok 99999
+ok 100000
+ok 100001
+ok 100002
+ok 100003
+ok 100004
+ok 100005
+DUMMY