summaryrefslogtreecommitdiff
path: root/t/99_pod.t
blob: cb6c3557e7544f3f6416d81fcc836ec4dcf33947 (plain)
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
#!perl

## Check our Pod, requires Test::Pod

use 5.006;
use strict;
use warnings;
use Test::More;

if (!$ENV{RELEASE_TESTING}) {
    plan (skip_all =>  'Test skipped unless environment variable RELEASE_TESTING is set');
}
else {
    plan tests => 2;
}

my $PODVERSION = '0.95';
eval {
    require Test::Pod;
    Test::Pod->import;
};

SKIP: {
    if ($@ or $Test::Pod::VERSION < $PODVERSION) {
        skip "Test::Pod $PODVERSION is required", 1;
    }
    pod_file_ok('check_postgres.pl');
}

## We won't require everyone to have this, so silently move on if not found
my $PODCOVERVERSION = '1.04';
eval {
    require Test::Pod::Coverage;
    Test::Pod::Coverage->import;
};
SKIP: {

    if ($@ or $Test::Pod::Coverage::VERSION < $PODCOVERVERSION) {
        skip "Test::Pod::Coverage $PODCOVERVERSION is required", 1;
    }

    my $trusted_names  =
        [
         qr{^CLONE$},    ## no critic (ProhibitFixedStringMatches)
         qr{^driver$},   ## no critic (ProhibitFixedStringMatches)
         qr{^constant$}, ## no critic (ProhibitFixedStringMatches)
        ];
    pod_coverage_ok('check_postgres', {trustme => $trusted_names}, 'check_postgres.pl pod coverage okay');
}