test/lib/RandomFileWithUnknownParameters.pm

filter: Statementstmt 93.7% 30 / 32 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 10 / 12 Podpod 0.0% 0 / 1 totaltotal 89.3% 42 / 47 SCAR 6.9
CC
2
Cov
94%
__ANON__
2.0
__ANON__
2.0
warning_when_unknown_param
2.0
CRAP 2.0
« test/lib/RandomFilePassesPathsToCheckRoutine.pm ↑ Summary test/lib/ContentOfRandomFileInScalarContext.pm »
1 package RandomFileWithUnknownParameters;
2 1 ▶use base qw/RandomFileMethodBase/;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use TestConstants;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Test::Warn;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 use constant UNKNOWN_PARAMS => (-verzeichnis => SIMPLE_DIR,
12 -ueberpruefe => qr/deutsch/,
13 -DIR => SIMPLE_DIR,
14 dir => SIMPLE_DIR,
15 0 ▶ -Check => sub {1},
Subroutine __ANON__: not called CC=1 SCAR=6.9
16 0 ▶ check => sub {1},
Subroutine __ANON__: not called CC=1 SCAR=6.9
17 1 -RECURSIVE => 1,
18 1 ▶ recursive => 1);
Subroutine BEGIN: called CC=1 SCAR=0.0
19
20 sub warning_when_unknown_param : Test(8) {
21 6 ▶ my $self = shift;
Subroutine warning_when_unknown_param: called CC=2 SCAR=6.9
Pod undocumented
22 6 my %params = UNKNOWN_PARAMS;
23 6 ▶ while (my @args = each %params) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@args) = each %params) 48 6 54
24 48 ▶ warning_like {$self->random_file(@args)}
Subroutine __ANON__: called CC=1 SCAR=0.0
25 48 [{carped => qr/unknown option/i}],
26 "Arguments: @args";
27 }
28 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 1 1;
« test/lib/RandomFilePassesPathsToCheckRoutine.pm ↑ Summary test/lib/ContentOfRandomFileInScalarContext.pm »