summaryrefslogtreecommitdiff
path: root/t/99-perlcritic.t
blob: 0c035b836c246babcd5ccebb3c34ce72e802552a (plain)
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
32
33
34
35
36
37
#!/usr/bin/env perl
# -*-mode:cperl; indent-tabs-mode: nil-*-

use 5.008003;
use strict;
use warnings;
use Test::More;

if (! $ENV{RELEASE_TESTING}) {
	plan (skip_all =>  'Test skipped unless environment variable RELEASE_TESTING is set');
}

eval {
	require Perl::Critic;
};
if ($@) {
   plan (skip_all =>  'Perl::Critic needed to run this test');
}
eval {
	require Test::Perl::Critic;
};
if ($@) {
   plan (skip_all =>  'Test::Perl::Critic needed to run this test');
}

## Gotta have a profile
my $PROFILE = '.perlcriticrc';
if (! -e $PROFILE) {
	plan (skip_all =>  qq{Perl::Critic profile "$PROFILE" not found\n});
}

plan tests => 2;
Test::Perl::Critic->import( -profile => $PROFILE );
critic_ok('Bucardo.pm');
critic_ok('bucardo');