File: release-pod-coverage.t

package info (click to toggle)
libdatetime-timezone-perl 1%3A1.58-1%2B2016d
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 174,932 kB
  • sloc: perl: 2,468; sh: 35; makefile: 16
file content (44 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

BEGIN {
  unless ($ENV{RELEASE_TESTING}) {
    require Test::More;
    Test::More::plan(skip_all => 'these tests are for release candidate testing');
  }
}


use strict;
use warnings;

use Test::More;

eval "use Test::Pod::Coverage 1.04";
plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage"
    if $@;

my %skip = map { $_ => 1 } qw(
    DateTime::TimeZone::Catalog
    DateTime::TimeZone::Floating
    DateTime::TimeZone::OffsetOnly
    DateTime::TimeZone::UTC
);

my @modules = grep {
    !(     $skip{$_}
        || /^DateTime::TimeZone::OlsonDB/
        || /^DateTime::TimeZone::Local::.+/
        || /^DateTime::TimeZone::(?:Africa|America|Antarctica|Asia|Atlantic|Australia|Europe|Indian|Pacific)/
        || /^DateTime::TimeZone::(?:CET|CST6CDT|EET|EST5EDT|EST|HST|MET|MST7MDT|MST|PST8PDT|WET)/
        )
} all_modules();

plan tests => scalar @modules;

my %trustme = (
    'DateTime::TimeZone' =>
        [ map {qr/^$_$/} qw( STORABLE_freeze STORABLE_thaw max_span ) ],
);

for my $mod ( sort @modules ) {
    pod_coverage_ok( $mod, { trustme => $trustme{$mod} || [] } );
}