File: perl-critic.t

package info (click to toggle)
libmodule-starter-plugin-cgiapp-perl 0.44-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 520 kB
  • sloc: perl: 1,119; makefile: 6
file content (36 lines) | stat: -rw-r--r-- 580 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/perl

# Test that the module passes perlcritic
use Test::More;
use strict;
BEGIN {
	$|  = 1;
	$^W = 1;
}

my @MODULES = (
	'Perl::Critic 1.098',
	"Test::Perl::Critic 1.01 (-profile => 'xt/perlcriticrc')",
);

# Load the testing modules
foreach my $MODULE ( @MODULES ) {
	eval "use $MODULE";
	if ( $@ ) {
		plan( skip_all => "$MODULE not available for testing" );
	}
}

my @files = qw{
    lib/Module/Starter/Plugin/CGIApp.pm
    script/cgiapp-starter
    script/titanium-starter
};

foreach my $file (@files) {
    critic_ok($file);
}

done_testing(scalar @files);

1;