line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
83878
|
use 5.008001; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
42
|
|
2
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package TAP::Harness::Restricted; |
6
|
|
|
|
|
|
|
# ABSTRACT: Skip some test files |
7
|
|
|
|
|
|
|
our $VERSION = '0.003'; # VERSION |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
733
|
use superclass 'TAP::Harness' => 3.18; |
|
1
|
|
|
|
|
7609
|
|
|
1
|
|
|
|
|
115
|
|
10
|
1
|
|
|
1
|
|
192
|
use Path::Tiny; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
535
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub aggregate_tests { |
13
|
1
|
|
|
1
|
1
|
5415
|
my ( $self, $aggregate, @tests ) = @_; |
14
|
1
|
|
50
|
|
|
10
|
my %banned_files = map { $_ => undef } map { glob } split " ", |
|
3
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
147
|
|
15
|
|
|
|
|
|
|
$ENV{HARNESS_SKIP} || ''; |
16
|
1
|
|
|
|
|
3
|
@tests = grep { _file_ok( $_, \%banned_files ) } @tests; |
|
13
|
|
|
|
|
341
|
|
17
|
1
|
|
|
|
|
14
|
return $self->SUPER::aggregate_tests( $aggregate, @tests ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my $maybe_prefix = qr/(?:\d+[_-]?)?/; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
my @banned_names = |
23
|
|
|
|
|
|
|
( qr/${maybe_prefix}pod\.t/, qr/${maybe_prefix}pod[_-]?coverage\.t/, ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my @banned_code = ( |
26
|
|
|
|
|
|
|
qr/use Test::Pod/, # also gets Test::Pod::Coverage |
27
|
|
|
|
|
|
|
); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub _file_ok { |
30
|
13
|
|
|
13
|
|
35
|
my $file = path(shift); |
31
|
13
|
|
|
|
|
255
|
my $banned_files = shift; |
32
|
13
|
50
|
|
|
|
35
|
return unless $file->exists; |
33
|
13
|
|
|
|
|
222
|
my $basename = $file->basename; |
34
|
13
|
100
|
|
|
|
280
|
return if grep { $basename =~ $_ } @banned_names; |
|
26
|
|
|
|
|
225
|
|
35
|
7
|
100
|
|
|
|
20
|
return if exists $banned_files->{ $file->relative }; |
36
|
4
|
|
|
|
|
385
|
my $guts = $file->slurp; |
37
|
4
|
100
|
|
|
|
738
|
return if grep { $guts =~ m{$_}ms } @banned_code; |
|
4
|
|
|
|
|
32
|
|
38
|
2
|
|
|
|
|
8
|
return 1; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# vim: ts=4 sts=4 sw=4 et: |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |