Branch Coverage

blib/lib/Test/Excel.pm
Criterion Covered Total %
branch 100 130 76.9


line true false branch
116 1 0 if ($status == 0) { }
144 0 52 unless $error =~ /Use of uninitialized value/
147 2 43 unless -f $got
148 2 41 unless -f $exp
151 41 0 unless (&blessed($got) and $got->isa("Spreadsheet::Read"))
156 41 0 unless (&blessed($exp) and $exp->isa("Spreadsheet::Read"))
169 16 14 if defined $spec
170 26 3 unless defined $error_limit
172 1 28 if (@gotWorkSheets != @expWorkSheets)
182 6 22 if defined $sheet
191 24 26 unless (exists $spec->{'ALL'})
192 0 24 if (uc $gotSheetName ne uc $expSheetName)
209 0 50 if (defined $gotRowMax and defined $expRowMax and $gotRowMax != $expRowMax)
216 0 50 if (defined $gotColMax and defined $expColMax and $gotColMax != $expColMax)
240 20 48 if defined $spec and exists $spec->{'ALL'} && exists $spec->{'ALL'}{$col} && exists $spec->{'ALL'}{$col}{$row} && exists $spec->{'ALL'}{$col}{$row}{$IGNORE} || exists $$spec{uc $gotSheetName} && exists $$spec{uc $gotSheetName}{$col} && exists $$spec{uc $gotSheetName}{$col}{$row} && exists $$spec{uc $gotSheetName}{$col}{$row}{$IGNORE}
244 1787 72 if (defined $gotData and defined $expData)
246 1555 232 if ($gotData =~ /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/ and $expData =~ /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/) { }
251 0 1555 if ($gotData < $ALMOST_ZERO and $expData < $ALMOST_ZERO) { }
256 101 1454 if (defined $rule and scalar keys %$rule) { }
260 65 36 if (defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row} and exists $$spec{uc $gotSheetName}{$col}{$row}{$SPECIAL_CASE} or @sheets and grep /$gotSheetName/, @sheets) { }
280 8 93 if (defined $compare_with and $compare_with < $difference) { }
293 2 1452 if ($expData != $gotData) { }
306 60 172 if (defined $spec and exists $$spec{uc $gotSheetName} and exists $$spec{uc $gotSheetName}{$col} and exists $$spec{uc $gotSheetName}{$col}{$row} and exists $$spec{uc $gotSheetName}{$col}{$row}{$REGEX_CASE} or exists $spec->{'ALL'}{$col} and exists $spec->{'ALL'}{$col}{$row} and exists $spec->{'ALL'}{$col}{$row}{$REGEX_CASE} or @sheets and grep /$gotSheetName/, @sheets) { }
321 59 1 if ($gotData =~ /$exp/i and $expData =~ /$exp/i) { }
333 10 162 if (uc $gotData ne uc $expData) { }
335 10 0 if (defined $rule) { }
351 62 1723 if (exists $rule->{'swap_check'} and defined $rule->{'swap_check'} and $rule->{'swap_check'}) { }
355 16 46 if ($status == 0)
360 0 9 if ($error_on_sheet >= $error_limit and $error_on_sheet % 2 == 0 and not _is_swapping($swap))
369 3 1720 if $status == 0
374 0 7 if ($error_on_sheet > 0 and $error_on_sheet >= $error_limit and $error_on_sheet % 2 == 0 and not _is_swapping($swap))
378 0 0 if $status == 0
382 9 0 if (exists $rule->{'swap_check'} and defined $rule->{'swap_check'} and $rule->{'swap_check'})
386 3 6 if ($error_on_sheet > 0 and _is_swapping($swap))
476 0 61 unless defined $cell
478 0 61 unless $cell =~ /([A-Za-z]+)(\d+)/
501 1 61 if $incr
536 0 28 unless defined $range
540 0 30 unless $_range =~ /(\w+\d+):(\w+\d+)/
564 0 17 unless defined $spec
566 1 16 unless -f $spec
577 0 62 unless $row =~ /\w/
578 0 62 if $row =~ /^#/
580 29 33 if ($row =~ /^sheet\s+(.*)/i) { }
21 12 elsif (defined $sheet and $row =~ /^range\s+(.*)/i) { }
5 7 elsif (defined $sheet and $row =~ /^regex\s+(.*)/i) { }
6 1 elsif (defined $sheet and $row =~ /^ignorerange\s+(.*)/i) { }
616 9 81 unless defined $hash and defined $key
617 0 81 unless ref $hash eq "HASH"
619 55 26 unless exists $hash->{$key}
626 0 13 unless defined $data
632 0 24 if grep /$exp->[0]/, @{$out;}
641 0 3532 unless defined $message
643 0 3532 if $ENV{'DEBUG'}
649 3 38 unless defined $rule
651 2 36 unless ref $rule eq "HASH"
656 0 9 if $keys == 1 and exists $rule->{'message'}
658 1 35 if $keys > 8
674 2 77 unless exists $valid->{$key}
677 7 26 if exists $rule->{'spec'} and keys %$rule == 1
679 22 4 if (exists $rule->{'spec'} and defined $rule->{'spec'} or exists $rule->{'sheet'} and defined $rule->{'sheet'}) { }
685 2 20 unless exists $rule->{'sheet_tolerance'} and defined $rule->{'sheet_tolerance'}
688 4 16 unless exists $rule->{'tolerance'} and defined $rule->{'tolerance'}
691 0 4 if (exists $rule->{'sheet_tolerance'} and defined $rule->{'sheet_tolerance'} or exists $rule->{'tolerance'} and defined $rule->{'tolerance'})
700 0 0 unless exists $rule->{'sheet'} and defined $rule->{'sheet'} or exists $rule->{'spec'} and defined $rule->{'spec'}