Skip to content

Commit

Permalink
Merge branch 'do-not-count-tests-if-possible' into blead
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeenan committed Dec 7, 2021
2 parents 2669990 + 70cbce2 commit 702d984
Show file tree
Hide file tree
Showing 43 changed files with 107 additions and 62 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -910,6 +910,7 @@ Michael Stevens <mstevens@etla.org>
Michael van Elst <mlelstv@serpens.de>
Michael Witten <mfwitten@gmail.com>
Michele Sardo
Michiel Beijen <mb@x14.nl>
Mik Firestone <fireston@lexmark.com>
Mike Doherty <mike@mikedoherty.ca>
Mike Fletcher <fletch@phydeaux.org>
Expand Down
3 changes: 2 additions & 1 deletion lib/B/Deparse-core.t
Expand Up @@ -36,7 +36,6 @@ BEGIN {

use strict;
use Test::More;
plan tests => 3904;

use feature (sprintf(":%vd", $^V)); # to avoid relying on the feature
# logic to add CORE::
Expand Down Expand Up @@ -435,6 +434,8 @@ SKIP:
ok($pass, "sanity checks");
}

done_testing();

__DATA__
#
# format:
Expand Down
4 changes: 3 additions & 1 deletion lib/B/Deparse-subclass.t
Expand Up @@ -4,7 +4,7 @@
# publicise an API for subclassing B::Deparse they can prevent us from
# gratuitously breaking conventions that CPAN modules already use.

use Test::More tests => 2;
use Test::More;

use B::Deparse;

Expand All @@ -22,3 +22,5 @@ like $nm->coderef2text(sub { my($a, $b, $c) }),
like $nm->coderef2text(sub { my $c; /(??{ $c })/; }),
qr/\Q(??{\E \$c_groovy/,
'overriding padname works for renaming lexicals in regexp blocks';
done_testing();
3 changes: 2 additions & 1 deletion lib/Benchmark.t
Expand Up @@ -8,7 +8,7 @@ BEGIN {
use warnings;
use strict;
our ($foo, $bar, $baz, $ballast);
use Test::More tests => 213;
use Test::More;

use Benchmark qw(:all);

Expand Down Expand Up @@ -634,6 +634,7 @@ is_deeply ([keys %Benchmark::Cache], \@before_keys,
}
}

done_testing();

package TieOut;

Expand Down
4 changes: 3 additions & 1 deletion lib/Config/Extensions.t
Expand Up @@ -6,7 +6,7 @@ BEGIN {
}
}
use strict;
use Test::More 'no_plan';
use Test::More;

BEGIN {use_ok 'Config::Extensions', '%Extensions'};

Expand All @@ -31,3 +31,5 @@ while (my ($key, $val) = each %Extensions) {
my $type = $val . '_ext';
like($Config{$type}, $re, "$key is $type");
}

done_testing();
4 changes: 3 additions & 1 deletion lib/DB.t
Expand Up @@ -18,7 +18,7 @@ use Scalar::Util qw( dualvar );
my $dualfalse = dualvar(0, 'false');
my $dualtrue = dualvar(1, 'true');

use Test::More tests => 106;
use Test::More;

# must happen at compile time for DB:: package variable localizations to work
BEGIN {
Expand Down Expand Up @@ -498,6 +498,8 @@ for my $method (qw( cprestop cpoststop awaken init stop idle cleanup output )) {
ok( defined &{ "DB::$method" }, "DB::$method() should be defined" );
}

done_testing();

# DB::skippkg() uses lexical
# DB::ready() uses lexical

Expand Down
3 changes: 2 additions & 1 deletion lib/DBM_Filter/t/01error.t
Expand Up @@ -45,7 +45,7 @@ print "# runFilter $name\n" ;
return $@;
}

use Test::More tests => 21;
use Test::More;

BEGIN { use_ok('DBM_Filter') };
my $db_file;
Expand Down Expand Up @@ -249,3 +249,4 @@ undef $db;
is $@, '', "untie without inner references" ;
}

done_testing();
3 changes: 2 additions & 1 deletion lib/DBM_Filter/t/02core.t
Expand Up @@ -30,7 +30,7 @@ sub writeFile

END { unlink keys %files if keys %files }

use Test::More tests => 189;
use Test::More;

BEGIN { use_ok('DBM_Filter') };
my $db_file;
Expand Down Expand Up @@ -728,3 +728,4 @@ sub checkRaw

}

done_testing();
3 changes: 2 additions & 1 deletion lib/DBM_Filter/t/compress.t
Expand Up @@ -14,7 +14,7 @@ print "# $@\n";
}
require "dbm_filter_util.pl";

use Test::More tests => 23;
use Test::More;

BEGIN { use_ok('DBM_Filter') };
my $db_file;
Expand Down Expand Up @@ -119,3 +119,4 @@ undef $db2;
is $@, '', "untie without inner references" ;
}

done_testing();
4 changes: 3 additions & 1 deletion lib/DBM_Filter/t/encode.t
Expand Up @@ -19,7 +19,7 @@ BEGIN

require "dbm_filter_util.pl";

use Test::More tests => 26;
use Test::More;

BEGIN { use_ok('DBM_Filter') };
my $db_file;
Expand Down Expand Up @@ -122,3 +122,5 @@ undef $db2;
}

}

done_testing();
3 changes: 2 additions & 1 deletion lib/DBM_Filter/t/int32.t
Expand Up @@ -5,7 +5,7 @@ use Carp;

require "dbm_filter_util.pl";

use Test::More tests => 22;
use Test::More;

BEGIN { use_ok('DBM_Filter') };
my $db_file;
Expand Down Expand Up @@ -97,3 +97,4 @@ undef $db2;
is $@, '', "untie without inner references" ;
}

done_testing();
3 changes: 2 additions & 1 deletion lib/DBM_Filter/t/null.t
Expand Up @@ -5,7 +5,7 @@ use Carp;

require "dbm_filter_util.pl";

use Test::More tests => 26;
use Test::More;

BEGIN { use_ok('DBM_Filter') };
my $db_file;
Expand Down Expand Up @@ -94,3 +94,4 @@ undef $db2;
is $@, '', "untie without inner references" ;
}

done_testing();
3 changes: 2 additions & 1 deletion lib/DBM_Filter/t/utf8.t
Expand Up @@ -18,7 +18,7 @@ BEGIN

require "dbm_filter_util.pl";

use Test::More tests => 20;
use Test::More;

BEGIN { use_ok('DBM_Filter') };
my $db_file;
Expand Down Expand Up @@ -96,3 +96,4 @@ undef $db2;
is $@, '', "untie without inner references" ;
}

done_testing();
4 changes: 3 additions & 1 deletion lib/DirHandle.t
Expand Up @@ -11,7 +11,7 @@ BEGIN {
}

use DirHandle;
use Test::More tests => 31;
use Test::More;

# Fetching the list of files in two different ways and expecting them
# to be the same is a race condition when tests are running in parallel.
Expand Down Expand Up @@ -133,3 +133,5 @@ ok(! $bbdot->close(),
if ($chdir) {
chdir "..";
}

done_testing();
5 changes: 4 additions & 1 deletion lib/English.t
Expand Up @@ -6,7 +6,7 @@ BEGIN {
@INC = '../lib';
}

use Test::More tests => 58;
use Test::More;

use English qw( -no_match_vars ) ;
use Config;
Expand Down Expand Up @@ -164,6 +164,9 @@ main::ok( !$POSTMATCH, '$POSTMATCH disabled' );
::is $LIST_SEPARATOR, 'frooble';
}

# because of the 'package' statements above, we have to prefix Test::More::
Test::More::done_testing();

__END__
This is a line.
This is a paragraph.
Expand Down
4 changes: 3 additions & 1 deletion lib/File/Basename.t
Expand Up @@ -5,7 +5,7 @@ BEGIN {
@INC = '../lib';
}

use Test::More tests => 65;
use Test::More;

BEGIN { use_ok 'File::Basename' }

Expand Down Expand Up @@ -184,3 +184,5 @@ SKIP: {
ok tainted(dirname($TAINT.'/perl/lib//'));
ok all_tainted(fileparse($TAINT.'/dir/draft.book7','\.book\d+'));
}

done_testing();
4 changes: 3 additions & 1 deletion lib/File/Compare.t
Expand Up @@ -17,7 +17,7 @@ BEGIN {
}
}

use Test::More ( tests => 16 );
use Test::More;
use File::Compare qw(compare compare_text);

# Upon success, compare() and compare_text() return a Unix-ish 0
Expand Down Expand Up @@ -132,6 +132,8 @@ SKIP: {
"compare() fails: second argument undefined");
}

done_testing();

sub get_valid_whitespace {
return ' ' unless $^O eq 'VMS';
return (exists $ENV{'DECC$EFS_CHARSET'} && $ENV{'DECC$EFS_CHARSET'} =~ /^[ET1]/i)
Expand Down
3 changes: 1 addition & 2 deletions lib/File/Copy.t
Expand Up @@ -14,8 +14,6 @@ use Test::More;

my $TB = Test::More->builder;

plan tests => 466;

# We are going to override rename() later on but Perl has to see an override
# at compile time to honor it.
BEGIN { *CORE::GLOBAL::rename = sub { CORE::rename($_[0], $_[1]) }; }
Expand Down Expand Up @@ -521,6 +519,7 @@ SKIP: {
"copy with buffer above normal size";
}

done_testing();

END {
1 while unlink "copy-$$";
Expand Down
4 changes: 3 additions & 1 deletion lib/FileHandle.t
Expand Up @@ -13,7 +13,7 @@ BEGIN {
use strict;
use FileHandle;
autoflush STDOUT 1;
use Test::More (tests => 12);
use Test::More;
my $TB = Test::More->builder;

my $mystdout = new_from_fd FileHandle 1,"w";
Expand Down Expand Up @@ -91,3 +91,5 @@ ok($|, "handle auto-flushing current output channel");
}

ok(!FileHandle->new('', 'r'), "Can't open empty filename");

done_testing();
4 changes: 3 additions & 1 deletion lib/Getopt/Std.t
Expand Up @@ -8,7 +8,7 @@ BEGIN {
use strict;
use warnings;

use Test::More tests => 22;
use Test::More;
use Getopt::Std;

our ($warning, $opt_f, $opt_i, $opt_o, $opt_x, $opt_y, %opt);
Expand Down Expand Up @@ -92,3 +92,5 @@ my $expected;
"getopt: single switch; switch expected argument, none provided; value undef");
undef %opt;
}

done_testing();
4 changes: 3 additions & 1 deletion lib/Internals.t
Expand Up @@ -7,7 +7,7 @@ BEGIN {
}
}

use Test::More tests => 82;
use Test::More;

my $ro_err = qr/^Modification of a read-only value attempted/;

Expand Down Expand Up @@ -188,3 +188,5 @@ is( Internals::SvREFCNT($foo), $big_count, "reference count unsigned");
eval { &Internals::SvREFCNT($foo, 0..3);};
like($@, qr/\Q$usage\E/);
}

done_testing();
4 changes: 3 additions & 1 deletion lib/Net/hostent.t
Expand Up @@ -19,7 +19,7 @@ BEGIN {
}
}

use Test::More tests => 10;
use Test::More;

BEGIN { use_ok 'Net::hostent' }

Expand Down Expand Up @@ -102,3 +102,5 @@ SKIP: {
}
}
}

done_testing();
2 changes: 1 addition & 1 deletion lib/Pod/t/Usage.t
Expand Up @@ -8,7 +8,6 @@ BEGIN {
use File::Basename;
use File::Spec;
use Test::More;
plan tests => 8;

use_ok( 'Pod::Usage' );

Expand Down Expand Up @@ -97,6 +96,7 @@ my $pod2usage = $$fake_out;

is( $pod2usage, $pod2text, 'Verbose level >= 2 eq pod2text' );

done_testing();

package CatchOut;
sub TIEHANDLE { bless \( my $self ), shift }
Expand Down
4 changes: 3 additions & 1 deletion lib/Symbol.t
Expand Up @@ -8,7 +8,7 @@ BEGIN {
@INC = '../lib';
}

use Test::More tests => 31;
use Test::More;

BEGIN { $_ = 'foo'; } # because Symbol used to clobber $_

Expand Down Expand Up @@ -111,3 +111,5 @@ ok( exists $::{'Bar::'}, 'third transient stash exists' );
ok( defined $Bar::{variable}, 'third transient variable in stash' );
ok( ! defined(Symbol::delete_package('Bar::Bar::')),
'delete_package() returns undef due to undefined leaf');

done_testing();
4 changes: 2 additions & 2 deletions lib/Thread.t
Expand Up @@ -14,7 +14,7 @@ BEGIN {

use Thread qw(:DEFAULT async yield);

use Test::More tests => 13;
use Test::More;

my $lock;
{
Expand Down Expand Up @@ -93,4 +93,4 @@ COND_:
is($thr->join(), 3, "->join returned thread's tid");
}

# EOF
done_testing();
3 changes: 2 additions & 1 deletion lib/Tie/ExtraHash.t
Expand Up @@ -2,7 +2,7 @@

use strict;
use warnings;
use Test::More tests => 11;
use Test::More;
use_ok('Tie::Hash');

tie my %tied, 'Tie::ExtraHash';
Expand Down Expand Up @@ -39,3 +39,4 @@ is_deeply(\%tied, \%hash, "CLEAR");
# SCALAR
is(scalar(%tied), scalar(%hash), "SCALAR");

done_testing();

0 comments on commit 702d984

Please sign in to comment.