Skip to content

Commit

Permalink
Fix running tests for Perl v5.12 and below.
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumeaubert committed Jan 31, 2016
1 parent 9c6bab2 commit 5a60ee7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions t/10-policy.t
Expand Up @@ -3,9 +3,18 @@
use strict;
use warnings;

use Test::More;
use Test::FailWarnings -allow_deps => 1;
use Test::Perl::Critic::Policy qw( all_policies_ok );

# PPI v1.218 introduces parsing bugs for .run test files with Perl v5.12 and
# below. As a result, PPI v1.215 is the last version that works with Perl lower
# than v5.14.
if ( ( $PPI::VERSION > 1.215 ) && ( $] < 5.014 ) )
{
diag( "Using PPI v$PPI::VERSION with Perl v$]." );
plan( skip_all => 'PPI v1.218 introduces parsing bugs for .run test files with Perl v5.12 and below, skipping' );
}

all_policies_ok(
-policies => [ 'TabIndentSpaceAlign' ],
Expand Down

0 comments on commit 5a60ee7

Please sign in to comment.