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
2 RandomFileWithUnknownParameters;
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 1 ▶use Test::Warn;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 use constant UNKNOWN_PARAMS => (-verzeichnis => SIMPLE_DIR,
13 -ueberpruefe => qr/deutsch/,
14 -DIR => SIMPLE_DIR,
15 dir => SIMPLE_DIR,
16 0 ▶ -Check => sub {1},
Subroutine __ANON__: not called CC=1 SCAR=6.9
17 0 ▶ check => sub {1},
Subroutine __ANON__: not called CC=1 SCAR=6.9
18 1 -RECURSIVE => 1,
19 1 ▶ recursive => 1);
Subroutine BEGIN: called CC=1 SCAR=0.0
20
21 sub warning_when_unknown_param : Test(8) {
22 6 ▶ my $self = shift;
Subroutine warning_when_unknown_param: called CC=2 SCAR=6.9
Pod undocumented
23 6 my %params = UNKNOWN_PARAMS;
24 6 ▶ while (my @args = each %params) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@args) = each %params) 48 6 54
25 48 ▶ warning_like {$self->random_file(@args)}
Subroutine __ANON__: called CC=1 SCAR=0.0
26 48 [{carped => qr/unknown option/i}],
27 "Arguments: @args";
28 }
29 1 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
30  
31 1 1;
« test/lib/RandomFilePassesPathsToCheckRoutine.pm ↑ Summary test/lib/ContentOfRandomFileInScalarContext.pm »