line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
TestConstants; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
100
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
our @ISA = qw/Exporter/; |
9
|
|
|
|
|
|
|
our @EXPORT = qw/SAMPLE_SIZE |
10
|
|
|
|
|
|
|
HOME_DIR SIMPLE_DIR EMPTY_DIR REC_DIR |
11
|
|
|
|
|
|
|
SIMPLE_FILES SIMPLE_FILES_WITH_NR SIMPLE_FILES_WITH_DOT |
12
|
|
|
|
|
|
|
REC_FILES REC_TOP_FILES REC_ODD_FILES |
13
|
|
|
|
|
|
|
SIMPLE_CONTENTS |
14
|
|
|
|
|
|
|
REC_CONTENTS |
15
|
|
|
|
|
|
|
no_slash with_slash/; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
our @EXPORT_OK = @EXPORT; |
18
|
|
|
|
|
|
|
our %EXPORT_TAGS = (); |
19
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
7
|
use Test::More; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
22
|
1
|
|
|
1
|
|
273
|
use Test::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
203
|
use Set::Scalar; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
25
|
1
|
|
|
1
|
|
13
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
5
|
use Cwd; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
117
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub files { |
30
|
5
|
|
|
5
|
0
|
12
|
return map {"file$_"} @_; |
|
17
|
|
|
|
|
318
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
7
|
use constant HOME_DIR => cwd() . '/test'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3287
|
|
34
|
1
|
|
|
1
|
|
31
|
use constant SIMPLE_DIR => cwd() . '/test/dir'; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2633
|
|
35
|
1
|
|
|
1
|
|
34
|
use constant EMPTY_DIR => SIMPLE_DIR . '/empty'; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
78
|
|
36
|
1
|
|
|
1
|
|
17
|
use constant REC_DIR => SIMPLE_DIR . '/rec'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
135
|
|
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
1
|
|
9
|
use constant SIMPLE_FILES_WITH_NR => files(1 .. 5); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
39
|
1
|
|
|
1
|
|
16
|
use constant SIMPLE_FILES_WITH_DOT => qw/x.dat y.dat z.dat/; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
72
|
|
40
|
1
|
|
|
|
|
76
|
use constant SIMPLE_FILES => SIMPLE_FILES_WITH_NR, |
41
|
1
|
|
|
1
|
|
7
|
SIMPLE_FILES_WITH_DOT; |
|
1
|
|
|
|
|
1
|
|
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
1
|
|
7
|
use constant REC_TOP_FILES => files(1 .. 3); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
3
|
|
44
|
|
|
|
|
|
|
use constant REC_FILES => REC_TOP_FILES, |
45
|
3
|
|
|
|
|
8
|
map( {"sub1/$_"} files(4 .. 6) ), |
46
|
3
|
|
|
|
|
6
|
map( {"sub1/subsub/$_"} files(7 .. 9) ), |
47
|
1
|
|
|
1
|
|
8
|
map( {"sub2/$_"} files(10 .. 12) ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
105
|
|
48
|
1
|
|
|
1
|
|
7
|
use constant REC_ODD_FILES => grep m/[13579]$/, REC_FILES; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
97
|
|
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
1
|
|
6
|
use constant REC_CONTENTS => map {"Content: $_"} REC_FILES; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
|
12
|
|
|
|
|
129
|
|
51
|
5
|
|
|
|
|
18
|
use constant SIMPLE_CONTENTS => ( map({"Content: $_"} SIMPLE_FILES_WITH_NR), |
52
|
1
|
|
|
|
|
3
|
map({"line 0\nline 1\nline 2\n$_\nline 4"} |
|
3
|
|
|
|
|
55
|
|
53
|
1
|
|
|
1
|
|
7
|
SIMPLE_FILES_WITH_DOT) ); |
|
1
|
|
|
|
|
2
|
|
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
7
|
use constant SAMPLE_SIZE => 250; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
191
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub no_slash { |
58
|
4
|
|
|
4
|
0
|
6
|
my $path = shift; |
59
|
4
|
|
|
|
|
31
|
$path =~ s:[/\\]*$::; |
60
|
4
|
|
|
|
|
184
|
return $path; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub with_slash { |
64
|
2
|
|
|
2
|
0
|
5
|
no_slash(shift()) . '/'; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |