ExtUtils::MakeMaker 6.55_02
[p5sagit/p5-mst-13.2.git] / lib / ExtUtils / t / 00compile.t
CommitLineData
479d2113 1#!/usr/bin/perl -w
2
3BEGIN {
4 if( $ENV{PERL_CORE} ) {
5 @INC = ('../lib', 'lib');
6 }
7 else {
8 unshift @INC, 't/lib';
9 }
10}
11chdir 't';
12
479d2113 13use Test::More;
14
15my $Has_Test_Pod;
16BEGIN {
17 $Has_Test_Pod = eval 'use Test::Pod 0.95; 1';
18}
19
cb06ebec 20chdir "..";
21my $manifest = "MANIFEST";
5bdf71cc 22open(my $manifest_fh, "<", $manifest) or die "Can't open $manifest: $!";
dedf98bc 23my @modules = map { m{^lib/(\S+)}; $1 }
cb06ebec 24 grep { m{^lib/\S+\.pm} }
25 <$manifest_fh>;
dedf98bc 26chomp @modules;
5bdf71cc 27close $manifest_fh;
dedf98bc 28
29chdir 'lib';
479d2113 30plan tests => scalar @modules * 2;
31foreach my $file (@modules) {
a592ba15 32 # Make sure we look at the local files and do not reload them if
33 # they're already loaded. This avoids recompilation warnings.
34 local @INC = @INC;
35 unshift @INC, ".";
36 ok eval { require($file); 1 } or diag "require $file failed.\n$@";
479d2113 37
38 SKIP: {
39 skip "Test::Pod not installed", 1 unless $Has_Test_Pod;
40 pod_file_ok($file);
41 }
479d2113 42}