line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package RandomFileCheckOption; |
2
|
1
|
|
|
1
|
|
8
|
use base qw/RandomFileMethodBase/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
81
|
|
3
|
1
|
|
|
1
|
|
7
|
use TestConstants; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
65
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
18
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
4
|
use Test::More; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
43
|
|
9
|
1
|
|
|
1
|
|
261
|
use Test::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
10
|
1
|
|
|
1
|
|
215
|
use Data::Dumper; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
103
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
101
|
use constant FILES_FOR_RE => (qr/\d$/ => [ SIMPLE_FILES_WITH_NR ], |
13
|
1
|
|
|
1
|
|
6
|
qr/\./ => [ SIMPLE_FILES_WITH_DOT ]); |
|
1
|
|
|
|
|
2
|
|
14
|
1
|
|
|
1
|
|
7
|
use constant WRONG_CHECK_PARAMS => (undef, '', '/./', {}, [], 0); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
202
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub check_standard_case : Test(4) { |
17
|
6
|
|
|
6
|
0
|
4476
|
my $self = shift; |
18
|
6
|
|
|
|
|
45
|
my %files = FILES_FOR_RE; |
19
|
6
|
|
|
|
|
28
|
foreach my $re (keys %files) { |
20
|
12
|
|
|
24000
|
|
4211
|
foreach my $check (qr/$re/, sub {/$re/}) { |
|
24000
|
|
|
|
|
135817
|
|
21
|
24
|
|
|
|
|
7244
|
my @args = (-dir => SIMPLE_DIR, -check => $check); |
22
|
24
|
|
|
|
|
231
|
$self->expected_files_found_ok($files{$re}, |
23
|
|
|
|
|
|
|
[@args], |
24
|
|
|
|
|
|
|
"Used RE $re as " . ref $check); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
1
|
|
|
1
|
|
7
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub wrong_check_params : Test(6) { |
30
|
6
|
|
|
6
|
0
|
4425
|
my $self = shift; |
31
|
6
|
|
|
|
|
24
|
foreach (WRONG_CHECK_PARAMS) { |
32
|
36
|
|
|
|
|
9891
|
my @args = (-dir => SIMPLE_DIR, -check => $_); |
33
|
36
|
|
|
36
|
|
3307
|
dies_ok( sub {$self->random_file(@args)}, |
34
|
36
|
|
|
|
|
207
|
"expected to die with Args " . Dumper(\@args) ); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
} |
37
|
1
|
|
|
1
|
|
386
|
} |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
4
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |