Skip to content

Commit a22f5db

Browse files
committed
Use done_testing() where appropriate
1 parent 80167dc commit a22f5db

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

t/00-load.t

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
use strict;
44
use warnings;
55

6-
76
use Test::FailWarnings -allow_deps => 1;
8-
use Test::More tests => 1;
9-
7+
use Test::More;
108

11-
BEGIN
12-
{
13-
use_ok( 'Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection' );
9+
BEGIN {
10+
use_ok('Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection');
1411
}
1512

16-
diag( "Testing Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection $Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection::VERSION, Perl $], $^X" );
13+
diag(
14+
"Testing Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection $Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection::VERSION, Perl $], $^X"
15+
);
16+
17+
done_testing();

t/30-policy.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use strict;
44
use warnings;
55

6-
use PPI;
6+
use PPI ();
77
use Test::FailWarnings -allow_deps => 1;
88
use Test::More;
99
use Test::Perl::Critic::Policy qw( all_policies_ok );
@@ -21,3 +21,5 @@ if ( ( $PPI::VERSION > 1.215 ) && ( $] < 5.014 ) ) {
2121
all_policies_ok(
2222
-policies => ['PreventSQLInjection'],
2323
);
24+
25+
done_testing();

t/35-default_themes.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
use strict;
44
use warnings;
55

6+
use Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection ();
67
use Test::FailWarnings -allow_deps => 1;
7-
use Test::More tests => 2;
8-
use Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection;
8+
use Test::More;
99

1010
can_ok(
1111
'Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection',
@@ -19,3 +19,5 @@ isnt(
1919
undef,
2020
'The policy is assigned to a default theme.',
2121
);
22+
23+
done_testing();

t/45-multi-docs.t

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ use strict;
44
use warnings;
55

66
use Test::FailWarnings -allow_deps => 1;
7-
use Test::More tests => 2;
8-
use Test::Perl::Critic;
9-
use File::Spec;
7+
use Test::More;
8+
use Test::Perl::Critic qw( all_critic_ok );
9+
use File::Spec ();
1010

1111
Test::Perl::Critic->import(
1212
'-single-policy' => 'ValuesAndExpressions::PreventSQLInjection' );
@@ -15,4 +15,3 @@ my $testfile1 = File::Spec->catfile( 't', 'files', 'test10.pl' );
1515
my $testfile2 = File::Spec->catfile( 't', 'files', 'test11.pl' );
1616

1717
all_critic_ok( $testfile1, $testfile2 );
18-

0 commit comments

Comments
 (0)