Branch Coverage

blib/lib/Image/ExifTool/ZIP.pm
Criterion Covered Total %
branch 46 144 31.9


line true false branch
267 0 0 unless $raf->Read($buff, 7) and $buff eq "Rar!\32\a\0"
276 0 0 unless $raf->Read($buff, 7) == 7
279 0 0 if ($flags & 32768)
280 0 0 unless $raf->Read($buff, 4) == 4
283 0 0 if $size < 0
284 0 0 unless $size
286 0 0 if ($size >= 2147483648 and not $et->Options("LargeFileSupport"))
291 0 0 if ($type == 116) { }
0 0 elsif ($type == 117 and $size > 6) { }
293 0 0 $size > 4096 ? :
294 0 0 unless $raf->Read($buff, $n) == $n
301 0 0 unless $raf->Read($buff, $size) == $size
303 0 0 if (&Get8u(\$buff, 3) == 48)
309 0 0 if $size
312 0 0 if ($docNum > 1 and not $et->Options("Duplicates"))
329 0 1 unless $raf->Read($buff, 10) and $buff =~ /^\x1f\x8b\x08/
342 1 0 if ($flags & 24)
343 0 1 if ($flags & 4)
345 0 0 unless $raf->Read($buff, 2) == 2
347 0 0 unless $raf->Read($buff, $len) == $len
349 0 1 unless $raf->Read($buff, 4096)
354 1 1 $tagID == 10 ? :
355 0 2 unless $flags & $mask
356 2 0 $buff =~ /\0/g ? :
362 0 2 if $end >= length $buff
375 27 1 unless $tagTablePtr
385 0 28 if defined $com and length $com
410 0 5 unless $raf->Read($buff, 30) == 30 and $buff =~ /^PK\x03\x04/
417 0 5 unless (eval { do { require Archive::Zip } } and eval { do { require IO::File } })
418 0 0 if ($et->{'FILE_EXT'} and $et->{'FILE_EXT'} ne "ZIP")
425 5 0 if ($raf->{'TESTED'} >= 0) { }
0 0 elsif (eval { do { require IO::String } }) { }
426 0 5 unless (eval { do { require IO::File } })
439 0 0 $raf->{'FILE_PT'} ? :
448 0 0 if ($status eq 4 and $raf->{'TESTED'} >= 0 and eval { do { require IO::String } } and $raf->Seek(0, 2) and $raf->Tell < 100000000)
459 0 5 if ($status)
468 0 5 if defined $comment and length $comment
476 1 4 if ($cType)
478 0 0 if (not $status and $buff =~ m[\sPartName\s*=\s*['"](?:/ppt/presentation.xml|/word/document.xml|/xl/workbook.xml)['"][^>]*\sContentType\s*=\s*(['"])([^"']+)\.main(\+xml)?\1] || $buff =~ /]*\sPartName[^<]+\sContentType\s*=\s*(['"])([^"']+)\.main(\+xml)?\1/ || $buff =~ /ContentType\s*=\s*(['"])([^"']+)\.main(\+xml)?\1/)
490 4 1 unless $mime
491 1 4 if ($mime or @members)
501 1 3 if (@members)
509 1 2 if (@members)
517 1 1 if ($mType)
519 1 0 if (not $status and $mime =~ /([\x21-\xfe]+)/s)
523 0 1 unless $openDocType{$mime}
527 0 1 unless $meta
528 1 0 if ($meta)
530 1 0 unless ($status)
546 1 0 if $meta and $mime ne "application/epub+zip"
549 0 0 if $status
550 0 0 unless $buff =~ /]*?\bfull-path=(['"])(.*?)\1/s
552 0 0 unless my $meta2 = $zip->memberNamed($2)
555 0 0 if $status
565 0 0 unless $dcTable->{$tag}
580 1 0 if ($openDocType{$mime} or $meta)
586 1 1 unless $thumb
588 1 0 unless $status
615 0 1 if ($extract{$file}) { }
0 1 elsif ($file eq 'Index/Document.iwa' and not $iWorkType) { }
0 1 elsif ($iWorkFile{$file}) { }
617 0 0 if $status
618 0 0 if ($file eq 'meta.json') { }
620 0 0 if ($et->{'VALUE'}{'App'} and $et->{'VALUE'}{'App'} =~ /sketch/i)
633 0 1 if $iWorkType
637 5 0 if ($zip)
640 0 5 if ($docNum > 1 and not $et->Options("Duplicates"))
667 0 0 unless $raf->Read($buf2, $len) == $len
681 0 0 if ($flags & 8)
690 0 0 unless $raf->Seek($len, 1)
691 0 0 unless $raf->Read($buff, 30) == 30 and $buff =~ /^PK\x03\x04/
694 0 0 if ($docNum > 1 and not $et->Options("Duplicates"))