File: 99..pod.t

package info (click to toggle)
libtext-trim-perl 1.04-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 140 kB
  • sloc: perl: 35; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 803 bytes parent folder | download | duplicates (4)
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

BEGIN {
    our @modules = qw(
        Text::Trim
    );
}

use File::Spec::Functions qw( catfile );

use Test::More tests => our @modules * 2;

SKIP: {
    eval 'use Test::Pod';

    skip "Test::Pod not installed", scalar @modules if $@;

    for my $module (@modules) {
        my @path = ('lib', split('::', $module));
        my $file = pop(@path) . '.pm';
        
        pod_file_ok(catfile(@path, $file), "$module pod ok");
    }
}

SKIP: {
    eval 'use Test::Pod::Coverage';

    skip "Test::Pod::Coverage not installed", scalar @modules if $@;

    for my $module (@modules) {
        pod_coverage_ok(
            $module,
            { also_private => [ qr(^[[:upper:][:digit:]_]+$) ] },
            "$module pod coverage ok"
        );
    }
}

__END__

vim: ft=perl ts=8 sts=4 sw=4 sr et