line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
RandomFileCheckOption; |
3
|
1
|
|
|
1
|
|
9
|
use base qw/RandomFileMethodBase/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
68
|
|
4
|
1
|
|
|
1
|
|
6
|
use TestConstants; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
7
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
22
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
4
|
use Test::More; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
10
|
1
|
|
|
1
|
|
296
|
use Test::Exception; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
11
|
1
|
|
|
1
|
|
185
|
use Data::Dumper; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
107
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
108
|
use constant FILES_FOR_RE => (qr/\d$/ => [ SIMPLE_FILES_WITH_NR ], |
14
|
1
|
|
|
1
|
|
7
|
qr/\./ => [ SIMPLE_FILES_WITH_DOT ]); |
|
1
|
|
|
|
|
2
|
|
15
|
1
|
|
|
1
|
|
7
|
use constant WRONG_CHECK_PARAMS => (undef, '', '/./', {}, [], 0); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
222
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub check_standard_case : Test(4) { |
18
|
6
|
|
|
6
|
0
|
4373
|
my $self = shift; |
19
|
6
|
|
|
|
|
36
|
my %files = FILES_FOR_RE; |
20
|
6
|
|
|
|
|
27
|
foreach my $re (keys %files) { |
21
|
12
|
|
|
24000
|
|
4019
|
foreach my $check (qr/$re/, sub {/$re/}) { |
|
24000
|
|
|
|
|
141866
|
|
22
|
24
|
|
|
|
|
7310
|
my @args = (-dir => SIMPLE_DIR, -check => $check); |
23
|
24
|
|
|
|
|
216
|
$self->expected_files_found_ok($files{$re}, |
24
|
|
|
|
|
|
|
[@args], |
25
|
|
|
|
|
|
|
"Used RE $re as " . ref $check); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
1
|
|
|
1
|
|
8
|
} |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub wrong_check_params : Test(6) { |
31
|
6
|
|
|
6
|
0
|
4310
|
my $self = shift; |
32
|
6
|
|
|
|
|
23
|
foreach (WRONG_CHECK_PARAMS) { |
33
|
36
|
|
|
|
|
10186
|
my @args = (-dir => SIMPLE_DIR, -check => $_); |
34
|
36
|
|
|
36
|
|
3377
|
dies_ok( sub {$self->random_file(@args)}, |
35
|
36
|
|
|
|
|
209
|
"expected to die with Args " . Dumper(\@args) ); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
} |
38
|
1
|
|
|
1
|
|
386
|
} |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |