File: pod-coverage.t

package info (click to toggle)
libdata-printer-perl 1.002001-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 748 kB
  • sloc: perl: 4,364; makefile: 7; sh: 1
file content (24 lines) | stat: -rw-r--r-- 834 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
use strict;
use warnings;
use Test::More;

my $success = eval "use Test::Pod::Coverage 1.04; 1";
if ($success) {
    plan tests => 18;
    foreach my $m (grep $_ !~ /(?:SCALAR|LVALUE|ARRAY|CODE|VSTRING|REF|GLOB|HASH|FORMAT|OBJECT|GenericClass|Regexp|Common)\z/, all_modules()) {
        my $params = {};
        if ($m =~ /\AData::Printer::Theme::/) {
            $params = { also_private => [qr/\Acolors\z/] };
        }
        elsif ($m =~ /\AData::Printer::Profile::/) {
            $params = { also_private => [qr/\Aprofile\z/] };
        }
        elsif ($m eq 'Data::Printer::Theme') {
            $params = { also_private => [qw(new name customized color_for sgr_color_for color_reset)] };
        }
        pod_coverage_ok($m, $params, "$m is covered");
    }
}
else {
    plan skip_all => 'Test::Pod::Coverage not found';
}