t/000-syntax.t
changeset 72 2a7ab8422dd6
parent 32 02ef2d1b190a
equal deleted inserted replaced
69:c12fa4d32903 72:2a7ab8422dd6
     4 use Test::More;
     4 use Test::More;
     5 
     5 
     6 use File::Find;
     6 use File::Find;
     7 
     7 
     8 my @scripts;
     8 my @scripts;
     9 find(sub { /^\./ and return; push @scripts, $File::Find::name if -f and -x }, "blib");
     9 find(sub { /^\./ and return; 
       
    10     push @scripts, $File::Find::name if -f and (-x or /\.pm$/)}, "blib");
    10 
    11 
    11 plan tests => scalar @scripts;
    12 plan tests => scalar @scripts;
    12 
    13 
    13 foreach (@scripts) {
    14 foreach (@scripts) {
    14 	my $e = `perl -c $_ 2>&1`;
    15 	my $e = `perl -Mblib -c $_ 2>&1`;
    15 	ok(!$?, "syntax ok") or diag $e;
    16 	ok(!$?, "syntax $_ ok") or diag $e;
    16 }
    17 }