File: critic.t

package info (click to toggle)
libtest-pod-content-perl 0.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 116 kB
  • ctags: 8
  • sloc: perl: 166; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use strict;
use warnings;

use Test::More;

if ( not $ENV{RELEASE_TESTING} ) {
	my $msg = 'Author test.  Set $ENV{RELEASE_TESTING} to a true value to run.';
	plan( skip_all => $msg );
	exit 0;
}

eval {
    require Test::Perl::Critic;
    Test::Perl::Critic::import('Test::Perl::Critic',
        -profile => 't/perlcriticrc', -serverity => 1
    );
};
if ($@) {
    Test::More::plan( 
       skip_all => 'Test::Critic required for testing criticism'
    );
}
if (-d 't/') {
    all_critic_ok();
}
else {
    # chdir .. is stupid, but the profile has to be given 
    # as argument to import and is loaded in all_critic_ok...
    chdir '..';
    all_critic_ok('lib');
}