diff options
Diffstat (limited to 't/perlcritic.t')
-rwxr-xr-x | t/perlcritic.t | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/perlcritic.t b/t/perlcritic.t new file mode 100755 index 0000000..e929713 --- /dev/null +++ b/t/perlcritic.t @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# $Id: perlcritic.t 1530 2007-03-08 20:42:13Z guillomovitch $ + +use strict; +use warnings; +use Test::More; +use File::Basename; +use File::Spec; + +if (!$ENV{TEST_AUTHOR}) { + plan( + skip_all => 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' + ); +} + +eval { + require Test::Perl::Critic; +}; + +if ($@) { + plan( + skip_all => 'Test::Perl::Critic not installed, skipping' + ); +} + +Test::Perl::Critic->import(); +my $libdir = File::Spec->catdir( + dirname($0), + File::Spec->updir(), + 'lib' +); +all_critic_ok($libdir); |