File: 04..pod.t

package info (click to toggle)
libfile-bom-perl 0.18-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 184 kB
  • sloc: perl: 715; makefile: 2
file content (42 lines) | stat: -rw-r--r-- 845 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

BEGIN {
    our @modules = qw(
        File::BOM
    );
}

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 $@;

    my $dir = $ENV{AUTOPKGTEST_TMP} ? '/usr/share/perl5' : 'lib';
    for my $module (@modules) {
        my @path = ($dir, 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