File: 99_pod_coverage.t

package info (click to toggle)
libtext-undiacritic-perl 0.07-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 148 kB
  • sloc: perl: 284; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 789 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/perl

use strict;
use warnings;

use Test::More;
use English qw(-no_match_vars);

eval 'use Test::Pod::Coverage 1.04';

if ( $EVAL_ERROR ) {
    my $msg = 'Test::Pod::Coverage 1.00 required for testing POD';
    plan skip_all => skip_all => $msg;
}

my @dirs = ( 'lib' );
if (-d '../t/') {       # we are inside t/
    @dirs = ('../lib');
}
else {                  # we are outside t/
    # add ./lib to include path if blib/lib is not there (e.g. we're not
    # run from Build test or the like)
    push @INC, './lib' if not grep { $_ eq 'blib/lib' } @INC;
}

my @files = all_modules( @dirs );

#use Data::Dumper;
#die Dumper \@files;

plan tests => scalar @files;
foreach (@files) {
    pod_coverage_ok( $_ ,
    {
        private => [
           qr/^_/,
        ]
    });
}