line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package |
2
|
|
|
|
|
|
|
RandomFileSimpleDirOption; |
3
|
1
|
|
|
1
|
|
8
|
use base qw/RandomFileMethodBase/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
408
|
|
4
|
1
|
|
|
1
|
|
9
|
use TestConstants; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
126
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
23
|
|
|
1
|
|
|
|
|
30
|
|
7
|
1
|
|
|
1
|
|
6
|
use Test::More; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
8
|
1
|
|
|
1
|
|
275
|
use Test::Exception; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
1
|
|
|
1
|
|
211
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
134
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
7
|
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
|
|
|
|
|
2
|
|
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
12
|
use constant EMPTY_DIR_ARGS => ([-path => EMPTY_DIR, -home => HOME_DIR], |
16
|
|
|
|
|
|
|
[-dir => no_slash (EMPTY_DIR)], |
17
|
1
|
|
|
1
|
|
8
|
[-dir => with_slash (EMPTY_DIR)]); |
|
1
|
|
|
|
|
1
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
101
|
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
|
95466
|
mkdir EMPTY_DIR; |
24
|
1
|
|
|
1
|
|
7
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub dir_option_with_a_simple_dir : Test(3) { |
27
|
6
|
|
|
6
|
0
|
4190
|
my $self = shift; |
28
|
6
|
|
|
|
|
22
|
foreach (SIMPLE_DIR_ARGS) { |
29
|
18
|
|
|
|
|
7946
|
$self->expected_files_found_ok([ SIMPLE_FILES ], |
30
|
|
|
|
|
|
|
$_, |
31
|
|
|
|
|
|
|
"Simple Dir: Args ". join " ", @$_); |
32
|
|
|
|
|
|
|
} |
33
|
1
|
|
|
1
|
|
729
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub dir_option_for_an_empty_dir : Test(3) { |
36
|
6
|
|
|
6
|
0
|
4183
|
my $self = shift; |
37
|
6
|
|
|
|
|
24
|
foreach (EMPTY_DIR_ARGS) { |
38
|
18
|
|
|
|
|
6718
|
$self->expected_files_found_ok([], |
39
|
|
|
|
|
|
|
$_, |
40
|
|
|
|
|
|
|
"Empty Dir: Argumente " . join " ", @$_); |
41
|
|
|
|
|
|
|
} |
42
|
1
|
|
|
1
|
|
305
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub samples_arent_same : Test(1) { |
45
|
6
|
|
|
6
|
0
|
4210
|
my ($self) = @_; |
46
|
6
|
|
|
|
|
25
|
my @arg = (-dir => SIMPLE_DIR); |
47
|
6
|
|
|
|
|
33
|
ok( ! eq_array( [$self->sample(@arg)], [$self->sample(@arg)] ), |
48
|
|
|
|
|
|
|
"samples are different" ); |
49
|
1
|
|
|
1
|
|
341
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub wrong_dir_parameters : Test(6) { |
52
|
6
|
|
|
6
|
0
|
4078
|
my ($self) = @_; |
53
|
6
|
|
|
|
|
24
|
foreach my $wrong_dir ( WRONG_DIR_PARAMS() ) { |
54
|
36
|
|
|
36
|
|
2740
|
dies_ok( sub {$self->random_file(-dir => $wrong_dir)}, |
55
|
36
|
|
|
|
|
10006
|
"-dir " . Dumper($wrong_dir) ); |
56
|
|
|
|
|
|
|
} |
57
|
1
|
|
|
1
|
|
381
|
} |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |