MakeMaker 6.10_02 -> 6.10_03
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / 00compile.t
1 #!/usr/bin/perl -w
2
3 BEGIN {
4     if( $ENV{PERL_CORE} ) {
5         @INC = ('../lib', 'lib');
6     }
7     else {
8         unshift @INC, 't/lib';
9     }
10 }
11 chdir 't';
12
13 use File::Find;
14 use File::Spec;
15 use Test::More;
16
17 my $Has_Test_Pod;
18 BEGIN {
19     $Has_Test_Pod = eval 'use Test::Pod 0.95; 1';
20 }
21
22 chdir File::Spec->updir;
23 my $manifest = File::Spec->catfile('MANIFEST');
24 open(MANIFEST, $manifest) or die "Can't open $manifest: $!";
25 my @modules = map { m{^lib/(\S+)}; $1 } 
26               grep { m{^lib/ExtUtils/\S*\.pm}  } <MANIFEST>;
27 chomp @modules;
28 close MANIFEST;
29
30 chdir 'lib';
31 plan tests => scalar @modules * 2;
32 foreach my $file (@modules) {
33     # 5.8.0 has a bug about require alone in an eval.  Thus the extra
34     # statement.
35     eval q{ require($file); 1 };
36     is( $@, '', "require $file" );
37
38     SKIP: {
39         skip "Test::Pod not installed", 1 unless $Has_Test_Pod;
40         pod_file_ok($file);
41     }
42 }