File: pod_coverage.t

package info (click to toggle)
libdatetime-calendar-julian-perl 0.107-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 176 kB
  • sloc: perl: 81; makefile: 2
file content (68 lines) | stat: -rw-r--r-- 1,496 bytes parent folder | download | duplicates (3)
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
package main;

use strict;
use warnings;

use Test::More 0.88;

BEGIN {
    eval {
	require Test::Pod::Coverage;
	Test::Pod::Coverage->VERSION(1.00);
	Test::Pod::Coverage->import();
	1;
    } or do {
	print <<eod;
1..0 # skip Test::Pod::Coverage 1.00 or greater required.
eod
	exit;
    };
}


{

=begin comment

    # all_pod_coverage_ok() will load the module for us, but we load it
    # explicitly because we want to tinker with its inheritance.
    require DateTime::Calendar::Julian;

    # This hack causes all DateTime methods to be considered documented.
    # Wish there was a cleaner way.
    local @DateTime::Calendar::Julian::ISA = qw{ DateTime };

=end comment

=cut

    all_pod_coverage_ok ({
	    also_private => [
		qr{ \A [[:upper:]\d_]+ \z }smx,
	    ],
	    # The following are DateTime methods not documented by that
	    # module in any way that Pod::Coverage recognizes
	    trustme	=> [
		qr{ \A day_0 \z }smx,
		qr{ \A day_of_ (?: month (?: _0 )? | week_0 | quarter_0 |
		    year_0 ) \Z }smx,
		qr{ \A do [qwy] (?: _0 )? \z }smx,
		qr{ \A era \z }smx,
		qr{ \A iso8601 \z }smx,
		qr{ \A local_rd_as_seconds \Z }smx,
		qr{ \A mday (?: _0 )? \z }smx,
		qr{ \A min \z }smx,
		qr{ \A mon (?: (?: th )? _0 )? \z }smx,
		qr{ \A quarter_0 \z }smx,
		qr{ \A sec \z }smx,
		qr{ \A STORABLE_ (?: freeze | thaw ) \z }smx,
		qr{ \A utc_year \z }smx,
		qr{ \A wday (?: _0 )? \z }smx,
	    ],
	    coverage_class => 'Pod::Coverage::CountParents'
	});

}
1;

# ex: set textwidth=72 :