changeset 2 | 19a7554ddd6c |
child 4 | cdf3ca65d677 |
1:ec7a3333127a | 2:19a7554ddd6c |
---|---|
1 use 5.010; |
|
2 use strict; |
|
3 use warnings; |
|
4 use Test::More; |
|
5 use File::Find; |
|
6 use File::Temp; |
|
7 |
|
8 my @files; |
|
9 find(sub { |
|
10 -f -x and ~/^\./ or return; |
|
11 push @files, $File::Find::name; |
|
12 }, "blib"); |
|
13 |
|
14 plan tests => scalar @files; |
|
15 |
|
16 my $tmp = File::Temp->new(); |
|
17 foreach my $file (@files) { |
|
18 system("perl -c $file 1>$tmp 2>&1"); |
|
19 is($? => 0, "syntax $file is ok") |
|
20 or do { seek $tmp, 0, 0; |
|
21 diag <$tmp> }; |
|
22 |
|
23 } |