-
Notifications
You must be signed in to change notification settings - Fork 15
/
99-pod-coverage.t
62 lines (56 loc) · 1.5 KB
/
99-pod-coverage.t
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
#!/usr/bin/perl
# Ensure pod coverage in your distribution
use strict;
BEGIN {
$| = 1;
$^W = 1;
}
my @MODULES = (
'Test::Pod::Coverage 1.08',
'File::Spec',
);
# Don't run tests during end-user installs
use Test::More;
plan( skip_all => 'Author tests not required for installation' )
unless ( $ENV{RELEASE_TESTING} );
# Load the testing modules
foreach my $MODULE ( @MODULES ) {
eval "use $MODULE";
if ( $@ ) {
$ENV{RELEASE_TESTING}
? die( "Failed to load required release-testing module $MODULE" )
: plan( skip_all => "$MODULE not available for testing" );
}
}
my %poded = (
'Feersum::Connection::Handle' => {
pod_from => 'blib/lib/Feersum/Connection/Handle.pm',
},
'Feersum::Connection::Writer' => {
pod_from => 'blib/lib/Feersum/Connection/Handle.pm',
},
'Feersum::Connection::Reader' => {
pod_from => 'blib/lib/Feersum/Connection/Handle.pm',
},
'Feersum::Connection' => {
pod_from => 'blib/lib/Feersum/Connection.pm',
},
'Feersum::Runner' => {
pod_from => 'blib/lib/Feersum/Runner.pm',
},
'Feersum' => {
pod_from => 'blib/lib/Feersum.pm',
},
'Plack::Handler::Feersum' => {
pod_from => 'blib/lib/Plack/Handler/Feersum.pm',
},
'feersum' => {
pod_from => 'blib/script/feersum',
},
);
plan tests => scalar keys %poded;
while (my ($mod, $params) = each %poded) {
$params->{pod_from} = File::Spec->catfile(split('/',$params->{pod_from}));
pod_coverage_ok($mod, $params);
}
1;