diff options
Diffstat (limited to 'cpan/ExtUtils-MakeMaker/t/00compile.t')
-rw-r--r-- | cpan/ExtUtils-MakeMaker/t/00compile.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpan/ExtUtils-MakeMaker/t/00compile.t b/cpan/ExtUtils-MakeMaker/t/00compile.t new file mode 100644 index 0000000000..743bd9980a --- /dev/null +++ b/cpan/ExtUtils-MakeMaker/t/00compile.t @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w + +BEGIN { + unshift @INC, 't/lib'; +} +chdir 't'; + +use Test::More; + +my $Has_Test_Pod; +BEGIN { + $Has_Test_Pod = eval 'use Test::Pod 0.95; 1'; +} + +chdir ".."; +my $manifest = "MANIFEST"; +open(my $manifest_fh, "<", $manifest) or die "Can't open $manifest: $!"; +my @modules = map { m{^lib/(\S+)}; $1 } + grep { m{^lib/\S+\.pm} } + <$manifest_fh>; +chomp @modules; +close $manifest_fh; + +chdir 'lib'; +plan tests => scalar @modules * 2; +foreach my $file (@modules) { + # Make sure we look at the local files and do not reload them if + # they're already loaded. This avoids recompilation warnings. + local @INC = @INC; + unshift @INC, "."; + ok eval { require($file); 1 } or diag "require $file failed.\n$@"; + + SKIP: { + skip "Test::Pod not installed", 1 unless $Has_Test_Pod; + pod_file_ok($file); + } +} |