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