line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
RandomFileSimpleDirOption; |
3
|
1
|
|
|
1
|
|
8
|
use base qw/RandomFileMethodBase/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
378
|
|
4
|
1
|
|
|
1
|
|
8
|
use TestConstants; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
98
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
30
|
|
|
1
|
|
|
|
|
84
|
|
7
|
1
|
|
|
1
|
|
7
|
use Test::More; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
8
|
1
|
|
|
1
|
|
234
|
use Test::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
9
|
1
|
|
|
1
|
|
194
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
122
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
5
|
use constant SIMPLE_DIR_ARGS => ([-path => SIMPLE_DIR, -home => HOME_DIR], |
12
|
|
|
|
|
|
|
[-dir => no_slash( SIMPLE_DIR)], |
13
|
1
|
|
|
1
|
|
8
|
[-dir => with_slash (SIMPLE_DIR)]); |
|
1
|
|
|
|
|
1
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
4
|
use constant EMPTY_DIR_ARGS => ([-path => EMPTY_DIR, -home => HOME_DIR], |
16
|
|
|
|
|
|
|
[-dir => no_slash (EMPTY_DIR)], |
17
|
1
|
|
|
1
|
|
14
|
[-dir => with_slash (EMPTY_DIR)]); |
|
1
|
|
|
|
|
3
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
99
|
use constant WRONG_DIR_PARAMS => ("/foo/bar/nonsens/reallynonsens/", |
20
|
1
|
|
|
1
|
|
7
|
undef, '', 0, [], {}); |
|
1
|
|
|
|
|
2
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub create_empty_subdir : Test(setup) { |
23
|
54
|
|
|
54
|
0
|
99695
|
mkdir EMPTY_DIR; |
24
|
1
|
|
|
1
|
|
7
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub dir_option_with_a_simple_dir : Test(3) { |
27
|
6
|
|
|
6
|
0
|
4225
|
my $self = shift; |
28
|
6
|
|
|
|
|
24
|
foreach (SIMPLE_DIR_ARGS) { |
29
|
18
|
|
|
|
|
7888
|
$self->expected_files_found_ok([ SIMPLE_FILES ], |
30
|
|
|
|
|
|
|
$_, |
31
|
|
|
|
|
|
|
"Simple Dir: Args ". join " ", @$_); |
32
|
|
|
|
|
|
|
} |
33
|
1
|
|
|
1
|
|
607
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub dir_option_for_an_empty_dir : Test(3) { |
36
|
6
|
|
|
6
|
0
|
4232
|
my $self = shift; |
37
|
6
|
|
|
|
|
25
|
foreach (EMPTY_DIR_ARGS) { |
38
|
18
|
|
|
|
|
6241
|
$self->expected_files_found_ok([], |
39
|
|
|
|
|
|
|
$_, |
40
|
|
|
|
|
|
|
"Empty Dir: Argumente " . join " ", @$_); |
41
|
|
|
|
|
|
|
} |
42
|
1
|
|
|
1
|
|
301
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub samples_arent_same : Test(1) { |
45
|
6
|
|
|
6
|
0
|
4713
|
my ($self) = @_; |
46
|
6
|
|
|
|
|
22
|
my @arg = (-dir => SIMPLE_DIR); |
47
|
6
|
|
|
|
|
34
|
ok( ! eq_array( [$self->sample(@arg)], [$self->sample(@arg)] ), |
48
|
|
|
|
|
|
|
"samples are different" ); |
49
|
1
|
|
|
1
|
|
311
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub wrong_dir_parameters : Test(6) { |
52
|
6
|
|
|
6
|
0
|
4192
|
my ($self) = @_; |
53
|
6
|
|
|
|
|
25
|
foreach my $wrong_dir ( WRONG_DIR_PARAMS() ) { |
54
|
36
|
|
|
36
|
|
2793
|
dies_ok( sub {$self->random_file(-dir => $wrong_dir)}, |
55
|
36
|
|
|
|
|
10424
|
"-dir " . Dumper($wrong_dir) ); |
56
|
|
|
|
|
|
|
} |
57
|
1
|
|
|
1
|
|
319
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |