From: Andy Grundman Date: Sat, 11 Aug 2007 16:32:27 +0000 (+0000) Subject: New test to prohibit leading tabs X-Git-Tag: 5.7099_04~167 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=72304f1702abf6fe42ac826409242165f7c75b39 New test to prohibit leading tabs --- diff --git a/t/04critic.rc b/t/04critic.rc new file mode 100644 index 0000000..412f770 --- /dev/null +++ b/t/04critic.rc @@ -0,0 +1,5 @@ +include = CodeLayout::ProhibitHardTabs +only = 1 + +[CodeLayout::ProhibitHardTabs] +allow_leading_tabs = 0 \ No newline at end of file diff --git a/t/04critic.t b/t/04critic.t new file mode 100644 index 0000000..d94c165 --- /dev/null +++ b/t/04critic.t @@ -0,0 +1,22 @@ +use strict; +use warnings; + +use File::Spec; +use FindBin (); +use Test::More; + +if ( !-e "$FindBin::Bin/../MANIFEST.SKIP" ) { + plan skip_all => 'Critic test only for developers.'; +} +else { + eval { require Test::Perl::Critic }; + if ( $@ ) { + plan tests => 1; + fail( 'You must install Test::Perl::Critic to run 04critic.t' ); + exit; + } +} + +my $rcfile = File::Spec->catfile( 't', '04critic.rc' ); +Test::Perl::Critic->import( -profile => $rcfile ); +all_critic_ok(); \ No newline at end of file