[Catalyst-commits] r6644 - trunk/Catalyst-Runtime/t
andyg at dev.catalyst.perl.org
andyg at dev.catalyst.perl.org
Sat Aug 11 17:32:28 GMT 2007
Author: andyg
Date: 2007-08-11 17:32:27 +0100 (Sat, 11 Aug 2007)
New Revision: 6644
Added:
trunk/Catalyst-Runtime/t/04critic.rc
trunk/Catalyst-Runtime/t/04critic.t
Log:
New test to prohibit leading tabs
Added: trunk/Catalyst-Runtime/t/04critic.rc
===================================================================
--- trunk/Catalyst-Runtime/t/04critic.rc (rev 0)
+++ trunk/Catalyst-Runtime/t/04critic.rc 2007-08-11 16:32:27 UTC (rev 6644)
@@ -0,0 +1,5 @@
+include = CodeLayout::ProhibitHardTabs
+only = 1
+
+[CodeLayout::ProhibitHardTabs]
+allow_leading_tabs = 0
\ No newline at end of file
Added: trunk/Catalyst-Runtime/t/04critic.t
===================================================================
--- trunk/Catalyst-Runtime/t/04critic.t (rev 0)
+++ trunk/Catalyst-Runtime/t/04critic.t 2007-08-11 16:32:27 UTC (rev 6644)
@@ -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
More information about the Catalyst-commits
mailing list