Debian Codegraph @

xt/author/pod-coverage.t

raw
1 #!perl
2 # This file was automatically generated by Dist::Zilla::Plugin::Test::Pod::Coverage::Configurable 0.07.
3
4 use Test::Pod::Coverage 1.08;
5 use Test::More 0.88;
6
7 BEGIN {
8 if ( $] <= 5.008008 ) {
9 plan skip_all => 'These tests require Pod::Coverage::TrustPod, which only works with Perl 5.8.9+';
10 }
11 }
12 use Pod::Coverage::TrustPod;
13
14 my %skip = map { $_ => 1 } qw( DateTime::TimeZone::Catalog DateTime::TimeZone::Floating DateTime::TimeZone::OffsetOnly DateTime::TimeZone::UTC );
15
16 my @modules;
17 for my $module ( all_modules() ) {
18 next if $skip{$module};
19 next if $module =~ qr/^DateTime::TimeZone::OlsonDB/;
20 next if $module =~ qr/^DateTime::TimeZone::Local::.+/;
21 next if $module =~ qr/^DateTime::TimeZone::(?:Africa|America|Antarctica|Asia|Atlantic|Australia|Europe|Indian|Pacific)/;
22 next if $module =~ qr/^DateTime::TimeZone::(?:CET|CST6CDT|EET|EST5EDT|EST|HST|MET|MST7MDT|MST|PST8PDT|WET)/;
23
24 push @modules, $module;
25 }
26
27 plan skip_all => 'All the modules we found were excluded from POD coverage test.'
28 unless @modules;
29
30 plan tests => scalar @modules;
31
32 my %trustme = (
33 'DateTime::TimeZone' => [
34 qr/^[A-Z_]+/,
35 qr/^max_span$/
36 ]
37 );
38
39 my @also_private;
40
41 for my $module ( sort @modules ) {
42 pod_coverage_ok(
43 $module,
44 {
45 coverage_class => 'Pod::Coverage::TrustPod',
46 also_private => \@also_private,
47 trustme => $trustme{$module} || [],
48 },
49 "pod coverage for $module"
50 );
51 }
52
53 done_testing();