Branch Coverage

blib/lib/Image/ExifTool/ZIP.pm
Criterion Covered Total %
branch 68 184 36.9


line true false branch
287 1 17 unless $raf->Read($buff, 1)
290 14 3 unless $num & 128
306 0 1 unless $raf->Read($buff, 7) and $buff =~ /Rar!\032\007[\000\001]/
308 0 1 if ($buff eq "Rar!\cZ\a\000") { }
318 0 0 unless $raf->Read($buff, 7) == 7
321 0 0 if ($flags & 32768)
322 0 0 unless $raf->Read($buff, 4) == 4
325 0 0 if $size < 0
326 0 0 unless $size
328 0 0 if ($size >= 2147483648)
329 0 0 if (not $et->Options('LargeFileSupport')) { }
0 0 elsif ($et->Options('LargeFileSupport') eq '2') { }
337 0 0 if ($type == 116) { }
0 0 elsif ($type == 117 and $size > 6) { }
339 0 0 $size > 4096 ? :
340 0 0 unless $raf->Read($buff, $n) == $n
347 0 0 unless $raf->Read($buff, $size) == $size
349 0 0 if (&Get8u(\$buff, 3) == 48)
355 0 0 if $size
360 0 1 unless $raf->Read($buff, 1) and $buff eq "\0"
370 1 3 if $headSize == 0
373 0 3 unless $raf->Read($header, $headSize) == $headSize
377 0 3 if ($headType == 4)
382 2 1 unless $headType == 2 or $headType == 3
383 1 0 if $headType == 2
388 1 0 if ($headFlag & 2) { }
390 1 0 if ($headType == 2) { }
397 0 0 if $headType == 3
402 1 0 unless $fileFlag & 8
404 0 1 if ($fileFlag & 2)
405 0 0 unless $rafHdr->Read($buff, 4) == 4
409 1 0 if $fileFlag & 4
418 0 1 unless $rafHdr->Read($buff, 1) == 1
420 0 1 unless $rafHdr->Read($buff, $nameLen) == $nameLen
432 0 1 if ($docNum > 1 and not $et->Options("Duplicates"))
449 0 1 unless $raf->Read($buff, 10) and $buff =~ /^\x1f\x8b\x08/
462 1 0 if ($flags & 24)
463 0 1 if ($flags & 4)
465 0 0 unless $raf->Read($buff, 2) == 2
467 0 0 unless $raf->Read($buff, $len) == $len
469 0 1 unless $raf->Read($buff, 4096)
474 1 1 $tagID == 10 ? :
475 0 2 unless $flags & $mask
476 2 0 $buff =~ /\0/g ? :
482 0 2 if $end >= length $buff
495 27 1 unless $tagTablePtr
505 0 28 if defined $com and length $com
530 0 5 unless $raf->Read($buff, 30) == 30 and $buff =~ /^PK\x03\x04/
537 0 5 unless (eval { do { require Archive::Zip } } and eval { do { require IO::File } })
538 0 0 if ($et->{'FILE_EXT'} and $et->{'FILE_EXT'} ne "ZIP")
545 5 0 if ($raf->{'TESTED'} >= 0) { }
0 0 elsif (eval { do { require IO::String } }) { }
546 0 5 unless (eval { do { require IO::File } })
559 0 0 $raf->{'FILE_PT'} ? :
568 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)
579 0 5 if ($status)
588 0 5 if defined $comment and length $comment
596 1 4 if ($cType)
598 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/)
610 4 1 unless $mime
611 1 4 if ($mime or @members)
621 1 3 if (@members)
629 1 2 if (@members)
637 1 1 if ($mType)
639 1 0 if (not $status and $mime =~ /([\x21-\xfe]+)/s)
643 0 1 unless $openDocType{$mime}
647 0 1 unless $meta
648 1 0 if ($meta)
650 1 0 unless ($status)
666 1 0 if $meta and $mime ne "application/epub+zip"
669 0 0 if $status
670 0 0 unless $buff =~ /]*?\bfull-path=(['"])(.*?)\1/s
672 0 0 unless my $meta2 = $zip->memberNamed($2)
675 0 0 if $status
685 0 0 unless $dcTable->{$tag}
700 1 0 if ($openDocType{$mime} or $meta)
706 1 1 unless $thumb
708 1 0 unless $status
735 0 1 if ($extract{$file}) { }
0 1 elsif ($file eq 'Index/Document.iwa' and not $iWorkType) { }
0 1 elsif ($iWorkFile{$file}) { }
737 0 0 if $status
738 0 0 if ($file eq 'meta.json') { }
740 0 0 if ($et->{'VALUE'}{'App'} and $et->{'VALUE'}{'App'} =~ /sketch/i)
753 0 1 if $iWorkType
757 5 0 if ($zip)
760 0 5 if ($docNum > 1 and not $et->Options("Duplicates"))
787 0 0 unless $raf->Read($buf2, $len) == $len
801 0 0 if ($flags & 8)
810 0 0 unless $raf->Seek($len, 1)
811 0 0 unless $raf->Read($buff, 30) == 30 and $buff =~ /^PK\x03\x04/
814 0 0 if ($docNum > 1 and not $et->Options("Duplicates"))