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( Log::Dispatch::ApacheLog Log::Dispatch::Conflicts );
15
16 my @modules;
17 for my $module ( all_modules() ) {
18 next if $skip{$module};
19
20 push @modules, $module;
21 }
22
23 plan skip_all => 'All the modules we found were excluded from POD coverage test.'
24 unless @modules;
25
26 plan tests => scalar @modules;
27
28 my %trustme = (
29 'Log::Dispatch' => [
30 qr/^(?:warn|err|crit|emerg)$/,
31 qr/^is_\w+$/
32 ],
33 'Log::Dispatch::File' => [
34 qr/^(?:O_)?APPEND$/
35 ],
36 'Log::Dispatch::Output' => [
37 qr/^new$/
38 ]
39 );
40
41 my @also_private;
42
43 for my $module ( sort @modules ) {
44 pod_coverage_ok(
45 $module,
46 {
47 coverage_class => 'Pod::Coverage::TrustPod',
48 also_private => \@also_private,
49 trustme => $trustme{$module} || [],
50 },
51 "pod coverage for $module"
52 );
53 }
54
55 done_testing();