File: 04-podcoverage.t

package info (click to toggle)
libhttp-server-simple-cgi-prefork-perl 6-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 152 kB
  • ctags: 6
  • sloc: perl: 282; makefile: 2
file content (65 lines) | stat: -rw-r--r-- 1,418 bytes parent folder | download | duplicates (3)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/perl -w

use strict;
use warnings;

use Test::More;

eval "use Test::Pod::Coverage 1.04";
plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
#all_pod_coverage_ok({  also_private => [ '/^[A-Z_]+$/' ], });

my @modules = all_modules();

my @web;
my @worker;
my @helpers;
my @other;

my $tests = 0;

foreach my $module (@modules) {
	if($module =~ /\:\:Worker\:\:/ && $module !~ /BaseModule/) {
		push @worker, $module;
        $tests++;
	} elsif($module =~ /\:\:Web\:\:/ && $module !~ /BaseModule/) {
		push @web, $module;
        $tests++;
	} elsif($module =~ /\:\:Helpers\:\:Cache/) {
		# Ignore local workaround clone
	} elsif($module =~ /\:\:Helpers\:\:/) {
		push @helpers, $module;
        $tests++;
	} else {
		push @other, $module;
        $tests++;
	}
}

plan tests => $tests;

# General modules
foreach my $module (@other) {
	pod_coverage_ok($module);
}

foreach my $module (@helpers) {
	my $trustparents = { coverage_class => 'Pod::Coverage::CountParents' };
	pod_coverage_ok( $module, $trustparents );
}

# Worker modules
foreach my $module (@worker) {
	my $trustparents = { coverage_class => 'Pod::Coverage::CountParents' };
	pod_coverage_ok( $module, $trustparents );
}

# Web modules
foreach my $module (@web) {
	my $trustparents = {
        coverage_class => 'Pod::Coverage::CountParents',
    };
	pod_coverage_ok( $module, $trustparents );
}

done_testing();