File: pod-coverage.t

package info (click to toggle)
libdatetime-locale-perl 1%3A0.45-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 7,816 kB
  • ctags: 8,274
  • sloc: xml: 22,344; perl: 1,565; makefile: 9
file content (94 lines) | stat: -rw-r--r-- 2,210 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
use strict;
use warnings;

use Test::More;

BEGIN {
    plan skip_all => 'This test is only run for the module author'
        unless -d '.hg' || $ENV{IS_MAINTAINER};
}

use File::Find::Rule;
use Test::Pod::Coverage 1.04;

my $dir = -d 'blib' ? 'blib' : 'lib';

my @files = sort File::Find::Rule ->file->name('*.pm')
    ->not( File::Find::Rule->grep('This file is auto-generated') )->in($dir);

plan tests => scalar @files;

for my $file (@files) {
    ( my $mod = $file ) =~ s/^.+(DateTime.+)\.pm$/$1/;
    $mod =~ s{/}{::}g;

    my @trustme = qr/^STORABLE_/;
    if ( $mod eq 'DateTime::Locale::Base' ) {

        # This is mostly the backwards compatibility cruft.
        push @trustme, (
            map {qr/^\Q$_\E$/}
                qw( new

                month_name
                month_abbreviation
                month_narrow

                month_names
                month_abbreviations
                month_narrows

                day_name
                day_abbreviation
                day_narrow

                day_names
                day_abbreviations
                day_narrows

                quarter_name
                quarter_abbreviation
                quarter_narrow

                quarter_names
                quarter_abbreviations

                am_pm
                am_pms

                era_name
                era_abbreviation
                era_narrow

                era_names
                era_abbreviations

                era
                eras

                date_before_time
                date_parts_order

                full_date_format
                long_date_format
                medium_date_format
                short_date_format
                default_date_format

                full_time_format
                long_time_format
                medium_time_format
                short_time_format
                default_time_format

                full_datetime_format
                long_datetime_format
                medium_datetime_format
                short_datetime_format
                default_datetime_format
                )
        );
    }

    pod_coverage_ok( $mod, { trustme => \@trustme } );
}