Skip to content

Commit

Permalink
done_testing requires Test::More 0.88; also use it correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
DrHyde committed Nov 7, 2020
1 parent 8576725 commit cd5db96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ WriteMakefile(
},
VERSION_FROM => 'lib/Tie/STDOUT.pm',
PREREQ_PM => {
File::Temp => 0, # all used for testing only
Test::More => 0,
Config => 0
File::Temp => 0,
Test::More => 0.88, # done_testing
}
);
3 changes: 2 additions & 1 deletion t/01_defaults.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use strict;
use warnings;

use Test::More;
END { done_testing() }

use Config;
use File::Temp;
Expand Down Expand Up @@ -35,6 +34,8 @@ test_fragment(
"default 'syswrite' works with an offset"
);

done_testing();

sub test_fragment {
my($fragment, $expected, $message) = @_;

Expand Down
3 changes: 2 additions & 1 deletion t/02_user_defined.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use strict;
use warnings;

use Test::More;
END { done_testing() };
my $accumulator;

use Tie::STDOUT
Expand All @@ -20,3 +19,5 @@ is($accumulator, 'FOO 20', "user-defined 'printf' works");

syswrite(STDOUT, "gibberish", 5, 2);
is($accumulator, 'BBERI', "user-defined 'syswrite' works");

done_testing();

0 comments on commit cd5db96

Please sign in to comment.