Dist-Zilla-BeLike-CSJEWELL

changeset 4:7aafc052a8db

Make sure tests do not go into sharedir.
author Curtis Jewell <csjewell@cpan.org>
date Wed Aug 11 23:18:29 2010 -0600 (2010-08-11)
parents a977f0b89982
children 1836c0643c04
files xt/author/perlcritic.t xt/author/pod_coverage.t xt/settings/perlcritic.txt
line diff
     1.1 --- a/xt/author/perlcritic.t	Wed Aug 11 23:17:58 2010 -0600
     1.2 +++ b/xt/author/perlcritic.t	Wed Aug 11 23:18:29 2010 -0600
     1.3 @@ -40,7 +40,7 @@
     1.4  	plan( skip_all => "Perl::Tidy needs updated to 20090616" );
     1.5  }
     1.6  
     1.7 -use File::Spec::Functions qw(catfile);
     1.8 +use File::Spec::Functions qw(catfile catdir);
     1.9  Perl::Critic::Utils::Constants->import(':profile_strictness');
    1.10  my $dummy = $Perl::Critic::Utils::Constants::PROFILE_STRICTNESS_QUIET;
    1.11  
    1.12 @@ -52,5 +52,10 @@
    1.13  	-severity           => 1, 
    1.14  	-profile-strictness => $Perl::Critic::Utils::Constants::PROFILE_STRICTNESS_QUIET
    1.15  );
    1.16 -all_critic_ok();
    1.17  
    1.18 +# I only want to criticize my own modules, not the share directory...
    1.19 +if (-d catdir('blib', 'lib')) {
    1.20 +    all_critic_ok(catdir('blib', 'lib', 'Dist'));
    1.21 +} else {
    1.22 +    all_critic_ok('lib');
    1.23 +}
     2.1 --- a/xt/author/pod_coverage.t	Wed Aug 11 23:17:58 2010 -0600
     2.2 +++ b/xt/author/pod_coverage.t	Wed Aug 11 23:18:29 2010 -0600
     2.3 @@ -4,6 +4,13 @@
     2.4  
     2.5  use strict;
     2.6  
     2.7 +sub filter {
     2.8 +	my $module = shift;
     2.9 +	
    2.10 +	return 0 if $module =~ m/auto::share/;
    2.11 +	return 1;
    2.12 +}
    2.13 +
    2.14  BEGIN {
    2.15  	use English qw(-no_match_vars);
    2.16  	$OUTPUT_AUTOFLUSH = 1;
    2.17 @@ -27,7 +34,7 @@
    2.18  }
    2.19  
    2.20  my @modules = all_modules();
    2.21 -my @modules_to_test = sort { $a cmp $b } @modules;
    2.22 +my @modules_to_test = sort { $a cmp $b } grep { filter($_) } @modules;
    2.23  my $test_count = scalar @modules_to_test;
    2.24  plan tests => $test_count;
    2.25  
     3.1 --- a/xt/settings/perlcritic.txt	Wed Aug 11 23:17:58 2010 -0600
     3.2 +++ b/xt/settings/perlcritic.txt	Wed Aug 11 23:18:29 2010 -0600
     3.3 @@ -35,3 +35,5 @@
     3.4  # No Emacs!
     3.5  [-Editor::RequireEmacsFileVariables]
     3.6  
     3.7 +# We have the command that needs to start with lowercase.
     3.8 +[-NamingConventions::Capitalization]