Upgrade to Devel::PPPort 3.09
[p5sagit/p5-mst-13.2.git] / ext / Devel / PPPort / t / podtest.t
1 ################################################################################
2 #
3 #            !!!!!   Do NOT edit this file directly!   !!!!!
4 #
5 #            Edit mktests.PL and/or parts/inc/podtest instead.
6 #
7 ################################################################################
8
9 BEGIN {
10   if ($ENV{'PERL_CORE'}) {
11     chdir 't' if -d 't';
12     @INC = ('../lib', '../ext/Devel/PPPort/t') if -d '../lib' && -d '../ext';
13     require Config; import Config;
14     use vars '%Config';
15     if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
16       print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
17       exit 0;
18     }
19   }
20   else {
21     unshift @INC, 't';
22   }
23
24   sub load {
25     eval "use Test";
26     require 'testutil.pl' if $@;
27   }
28
29   if (0) {
30     load();
31     plan(tests => 0);
32   }
33 }
34
35 use Devel::PPPort;
36 use strict;
37 $^W = 1;
38
39 package Devel::PPPort;
40 use vars '@ISA';
41 require DynaLoader;
42 @ISA = qw(DynaLoader);
43 bootstrap Devel::PPPort;
44
45 package main;
46
47 my @pods = qw( HACKERS PPPort.pm ppport.h soak devel/regenerate devel/buildperl.pl );
48
49 my $reason = '';
50
51 if ($ENV{'SKIP_SLOW_TESTS'}) {
52   $reason = 'SKIP_SLOW_TESTS';
53 }
54 else {
55   # Try loading Test::Pod
56   eval q{
57     use Test::Pod;
58     $Test::Pod::VERSION >= 0.95
59         or die "Test::Pod version only $Test::Pod::VERSION";
60     import Test::Pod tests => scalar @pods;
61   };
62   $reason = 'Test::Pod >= 0.95 required' if $@;
63 }
64
65 if ($reason) {
66   load();
67   plan(tests => scalar @pods);
68 }
69
70 for (@pods) {
71   print "# checking $_\n";
72   if ($reason) {
73     skip("skip: $reason", 0);
74   }
75   else {
76     pod_file_ok($_);
77   }
78 }
79