"Fossies" - the Fresh Open Source Software Archive

Member "perl-5.32.1/cpan/ExtUtils-MakeMaker/t/00compile.t" (18 Dec 2020, 929 Bytes) of package /linux/misc/perl-5.32.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl -w
    2 
    3 BEGIN {
    4     unshift @INC, 't/lib';
    5 }
    6 chdir 't';
    7 
    8 use Test::More;
    9 
   10 my $Has_Test_Pod;
   11 BEGIN {
   12     $Has_Test_Pod = eval 'use Test::Pod 0.95; 1';
   13 }
   14 
   15 plan skip_all => 'No MANIFEST'
   16   unless -e "../MANIFEST";
   17 
   18 chdir "..";
   19 
   20 my $manifest = "MANIFEST";
   21 open(my $manifest_fh, "<", $manifest) or die "Can't open $manifest: $!";
   22 my @modules = map  { m{^lib/(\S+)}; $1 }
   23               grep { m{^lib/\S+\.pm} }
   24               <$manifest_fh>;
   25 
   26 chomp @modules;
   27 close $manifest_fh;
   28 
   29 chdir 'lib';
   30 plan tests => scalar @modules * 2;
   31 foreach my $file (@modules) {
   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$@";
   37 
   38     SKIP: {
   39         skip "Test::Pod not installed", 1 unless $Has_Test_Pod;
   40         pod_file_ok($file);
   41     }
   42 }