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
398 0 5 unless $raf->Read($buff, 30) == 30 and $buff =~ /^PK\x03\x04/
405 0 5 unless (eval { do { require Archive::Zip } } and eval { do { require IO::File } })
406 0 0 if ($et->{'FILE_EXT'} and $et->{'FILE_EXT'} ne "ZIP")
413 5 0 if ($raf->{'TESTED'} >= 0) { }
0 0 elsif (eval { do { require IO::String } }) { }
414 0 5 unless (eval { do { require IO::File } })
427 0 0 $raf->{'FILE_PT'} ? :
436 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)
447 0 5 if ($status)
456 0 5 if defined $comment and length $comment
464 1 4 if ($cType)
466 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/)
478 4 1 unless $mime
479 1 4 if ($mime or @members)
489 1 3 if (@members)
497 1 2 if (@members)
505 1 1 if ($mType)
507 1 0 if (not $status and $mime =~ /([\x21-\xfe]+)/s)
511 0 1 unless $openDocType{$mime}
515 0 1 unless $meta
516 1 0 if ($meta)
518 1 0 unless ($status)
534 1 0 if $meta and $mime ne "application/epub+zip"
537 0 0 if $status
538 0 0 unless $buff =~ /]*?\bfull-path=(['"])(.*?)\1/s
540 0 0 unless my $meta2 = $zip->memberNamed($2)
543 0 0 if $status
553 0 0 unless $dcTable->{$tag}
568 1 0 if ($openDocType{$mime} or $meta)
574 1 1 unless $thumb
576 1 0 unless $status
603 0 1 if ($extract{$file}) { }
0 1 elsif ($file eq 'Index/Document.iwa' and not $iWorkType) { }
0 1 elsif ($iWorkFile{$file}) { }
605 0 0 if $status
606 0 0 if ($file eq 'meta.json') { }
608 0 0 if ($et->{'VALUE'}{'App'} and $et->{'VALUE'}{'App'} =~ /sketch/i)
621 0 1 if $iWorkType
625 5 0 if ($zip)
628 0 5 if ($docNum > 1 and not $et->Options("Duplicates"))
655 0 0 unless $raf->Read($buf2, $len) == $len
669 0 0 if ($flags & 8)
678 0 0 unless $raf->Seek($len, 1)
679 0 0 unless $raf->Read($buff, 30) == 30 and $buff =~ /^PK\x03\x04/
682 0 0 if ($docNum > 1 and not $et->Options("Duplicates"))