hv_fetchs() support
[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} } 
27               grep { !m{/t/} } <MANIFEST>;
28 chomp @modules;
29 close MANIFEST;
30
31 chdir 'lib';
32 plan tests => scalar @modules * 2;
33 foreach my $file (@modules) {
34     # 5.8.0 has a bug about require alone in an eval.  Thus the extra
35     # statement.
36     eval { require($file); 1 };
37     is( $@, '', "require $file" );
38
39     SKIP: {
40         skip "Test::Pod not installed", 1 unless $Has_Test_Pod;
41         pod_file_ok($file);
42     }
43 }