| 1 | package | ||||||||||
| 2 | RandomFilePassesPathsToCheckRoutine; | ||||||||||
| 3 | 1 | ▶ | use base qw/RandomFileMethodBase/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use TestConstants; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Test::More; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | sub check_routine_gets_paths : Test(2) { | ||||||||||
| 12 | 6 | ▶ | my $self = shift; | ||||||||
|
Subroutine
check_routine_gets_paths: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 13 | 6 | my @files_shift = (); | |||||||||
| 14 | 6 | my @files_it = (); | |||||||||
| 15 | 6 | my %files = ('with shift' => \@files_shift, | |||||||||
| 16 | 'with $_' => \@files_it); | ||||||||||
| 17 | my %check_routine = ( | ||||||||||
| 18 | 18000 | ▶ | 'with shift' => sub { push @files_shift, shift() }, | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 18000 | ▶ | 'with $_' => sub { push @files_it, $_ } | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 6 | ); | |||||||||
| 21 | 6 | ▶ | while (my ($check_desc, $check_func) = each %check_routine) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 12 | my @args = (-dir => REC_DIR, | |||||||||
| 23 | -recursive => 1, | ||||||||||
| 24 | -check => $check_func); | ||||||||||
| 25 | 12 | my $exp = Set::Scalar->new(); | |||||||||
| 26 | 12 | $exp->insert( $self->random_file(@args) ) for (1 .. SAMPLE_SIZE); | |||||||||
| 27 | 12 | my $found_files = Set::Scalar->new( @{$files{$check_desc}} ); | |||||||||
| 28 | |||||||||||
| 29 | 12 | is $found_files, $exp, "Arguments passed to check $check_desc"; | |||||||||
| 30 | } | ||||||||||
| 31 | 1 | ▶ | } | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 32 | |||||||||||
| 33 | 1 | 1; | |||||||||