line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
TestConstants; |
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
134
|
|
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
|
|
|
|
|
9
|
|
22
|
1
|
|
|
1
|
|
394
|
use Test::Exception; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
10
|
|
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
313
|
use Set::Scalar; |
|
1
|
|
|
|
|
11
|
|
|
1
|
|
|
|
|
58
|
|
25
|
1
|
|
|
1
|
|
7
|
use Data::Dumper; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
1
|
|
6
|
use Cwd; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
148
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub files { |
30
|
5
|
|
|
5
|
0
|
15
|
return map {"file$_"} @_; |
|
17
|
|
|
|
|
344
|
|
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
7
|
use constant HOME_DIR => cwd() . '/test'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4213
|
|
34
|
1
|
|
|
1
|
|
42
|
use constant SIMPLE_DIR => cwd() . '/test/dir'; |
|
1
|
|
|
|
|
13
|
|
|
1
|
|
|
|
|
3360
|
|
35
|
1
|
|
|
1
|
|
41
|
use constant EMPTY_DIR => SIMPLE_DIR . '/empty'; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
85
|
|
36
|
1
|
|
|
1
|
|
7
|
use constant REC_DIR => SIMPLE_DIR . '/rec'; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
109
|
|
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
1
|
|
16
|
use constant SIMPLE_FILES_WITH_NR => files(1 .. 5); |
|
1
|
|
|
|
|
18
|
|
|
1
|
|
|
|
|
16
|
|
39
|
1
|
|
|
1
|
|
14
|
use constant SIMPLE_FILES_WITH_DOT => qw/x.dat y.dat z.dat/; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
78
|
|
40
|
1
|
|
|
|
|
77
|
use constant SIMPLE_FILES => SIMPLE_FILES_WITH_NR, |
41
|
1
|
|
|
1
|
|
9
|
SIMPLE_FILES_WITH_DOT; |
|
1
|
|
|
|
|
2
|
|
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
1
|
|
6
|
use constant REC_TOP_FILES => files(1 .. 3); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
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
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
15
|
|
|
3
|
|
|
|
|
127
|
|
48
|
1
|
|
|
1
|
|
8
|
use constant REC_ODD_FILES => grep m/[13579]$/, REC_FILES; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
109
|
|
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
1
|
|
7
|
use constant REC_CONTENTS => map {"Content: $_"} REC_FILES; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
12
|
|
|
|
|
147
|
|
51
|
5
|
|
|
|
|
12
|
use constant SIMPLE_CONTENTS => ( map({"Content: $_"} SIMPLE_FILES_WITH_NR), |
52
|
1
|
|
|
|
|
2
|
map({"line 0\nline 1\nline 2\n$_\nline 4"} |
|
3
|
|
|
|
|
56
|
|
53
|
1
|
|
|
1
|
|
7
|
SIMPLE_FILES_WITH_DOT) ); |
|
1
|
|
|
|
|
2
|
|
54
|
|
|
|
|
|
|
|
55
|
1
|
|
|
1
|
|
6
|
use constant SAMPLE_SIZE => 250; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
219
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub no_slash { |
58
|
4
|
|
|
4
|
0
|
6
|
my $path = shift; |
59
|
4
|
|
|
|
|
36
|
$path =~ s:[/\\]*$::; |
60
|
4
|
|
|
|
|
230
|
return $path; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub with_slash { |
64
|
2
|
|
|
2
|
0
|
4
|
no_slash(shift()) . '/'; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |