File: 00-coverage.t

package info (click to toggle)
ack 2.24-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,704 kB
  • sloc: perl: 8,590; ansic: 21; fortran: 11; makefile: 5; sh: 5
file content (28 lines) | stat: -rw-r--r-- 595 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
#!perl -T

# Make sure we have a .t file each *.pm.  This prevents a forgetful
# developer from creating a .pm without making the test, too.

# If you've made this test fail, it's because you need a t/lib/*.t
# file to test your new module.

use warnings;
use strict;

use Test::More;

unless ( $ENV{RELEASE_TESTING} ) {
    plan( skip_all => "these tests are for release candidate testing" );
}

my @pms = glob( '*.pm' );

plan tests => scalar @pms;

for my $pm ( @pms ) {
    my $t = $pm;
    $t =~ s/\.pm$/.t/ or die;
    ok( -r "t/lib/$t", "$pm has a corresponding $t" );
}

done_testing();