line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
RandomFileCheckOption; |
3
|
1
|
|
|
1
|
|
10
|
use base qw/RandomFileMethodBase/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
85
|
|
4
|
1
|
|
|
1
|
|
6
|
use TestConstants; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
89
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
7
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use Test::More; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
334
|
use Test::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
11
|
1
|
|
|
1
|
|
215
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
139
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
131
|
use constant FILES_FOR_RE => (qr/\d$/ => [ SIMPLE_FILES_WITH_NR ], |
14
|
1
|
|
|
1
|
|
8
|
qr/\./ => [ SIMPLE_FILES_WITH_DOT ]); |
|
1
|
|
|
|
|
2
|
|
15
|
1
|
|
|
1
|
|
7
|
use constant WRONG_CHECK_PARAMS => (undef, '', '/./', {}, [], 0); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
244
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub check_standard_case : Test(4) { |
18
|
6
|
|
|
6
|
0
|
4213
|
my $self = shift; |
19
|
6
|
|
|
|
|
38
|
my %files = FILES_FOR_RE; |
20
|
6
|
|
|
|
|
29
|
foreach my $re (keys %files) { |
21
|
12
|
|
|
24000
|
|
4114
|
foreach my $check (qr/$re/, sub {/$re/}) { |
|
24000
|
|
|
|
|
136884
|
|
22
|
24
|
|
|
|
|
7380
|
my @args = (-dir => SIMPLE_DIR, -check => $check); |
23
|
24
|
|
|
|
|
229
|
$self->expected_files_found_ok($files{$re}, |
24
|
|
|
|
|
|
|
[@args], |
25
|
|
|
|
|
|
|
"Used RE $re as " . ref $check); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
1
|
|
|
1
|
|
8
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub wrong_check_params : Test(6) { |
31
|
6
|
|
|
6
|
0
|
4230
|
my $self = shift; |
32
|
6
|
|
|
|
|
21
|
foreach (WRONG_CHECK_PARAMS) { |
33
|
36
|
|
|
|
|
10137
|
my @args = (-dir => SIMPLE_DIR, -check => $_); |
34
|
36
|
|
|
36
|
|
3169
|
dies_ok( sub {$self->random_file(@args)}, |
35
|
36
|
|
|
|
|
211
|
"expected to die with Args " . Dumper(\@args) ); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |
38
|
1
|
|
|
1
|
|
475
|
} |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |