]> git.imager.perl.org - imager.git/blob - t/t94kwalitee.t
add an unshipped test for checking sub-module versions are updated
[imager.git] / t / t94kwalitee.t
1 #!perl -w
2 # this is intended for various kwalitee tests
3 use strict;
4 use Test::More;
5 use ExtUtils::Manifest qw(maniread);
6
7 my $manifest = maniread;
8
9 # work up counts first
10
11 my @pl_files = grep /\.(p[lm]|PL|perl)$/, keys %$manifest;
12
13 plan tests => scalar(@pl_files);
14
15 for my $filename (@pl_files) {
16   open PL, "< $filename"
17     or die "Cannot open $filename: $!";
18   my $found_strict;
19   while (<PL>) {
20     if (/^use strict;/) {
21       ++$found_strict;
22       last;
23     }
24   }
25   close PL;
26   ok($found_strict, "file $filename has use strict");
27 }