Condition Coverage

blib/lib/Image/ExifTool/PDF.pm
Criterion Covered Total %
condition 80 289 27.6


and 3 conditions

line !l l&&!r l&&r condition
751 2 39 0 $offset and $offset =~ /^I/
787 217 0 217 $data =~ /\S/ and not $data =~ /^\s*%/
823 0 0 0 defined $obj and ref $obj eq "HASH"
824 0 0 0 $obj->{'First'} and $obj->{'N'}
841 0 0 0 $index < $obj->{'N'} and $table->[$i] == $objNum
955 0 0 0 $objData =~ /^\d+$/ and $$dataPt =~ s/^(\d+)\s+R//s
961 0 0 70 $raf and $raf->ReadLine($data)
1108 0 0 1148 $raf and $raf->ReadLine($buff)
1137 0 0 0 $2 eq ">>" and $delim[0] eq ">"
1200 0 0 0 @lzw >= $mask and $bits < 12
1234 43 0 0 $filters[0] and $filters[0] eq "/Crypt"
1256 0 0 0 $pre and $pre ne 1
0 0 0 $pre and $pre ne 1 and $pre ne 12
1265 0 0 0 $inflate and $stat == Compress::Zlib::Z_STREAM_END()
1275 0 0 0 $pre and $pre eq 12
1354 0 0 0 $_ ge "!" and $_ le "u"
1513 0 0 4 $encrypt and ref $encrypt eq "HASH"
1517 0 0 4 $filt and $filt =~ s[^/][]
1525 4 0 0 $encrypt->{'SubFilter'} and $encrypt->{'SubFilter'} =~ m[^/(.*)]
1534 0 0 4 $encrypt->{'O'} and $encrypt->{'P'}
0 0 4 $encrypt->{'O'} and $encrypt->{'P'} and $encrypt->{'U'}
1552 0 6 0 $$flagPt and $$flagPt eq "/Identity"
1553 0 6 0 $$flagPt and $$flagPt ne "/StdCF"
1557 0 0 3 ref $encrypt->{'CF'} eq "HASH" and ref $encrypt->{'CF'}{'StdCF'} eq "HASH"
0 0 3 ref $encrypt->{'CF'} eq "HASH" and ref $encrypt->{'CF'}{'StdCF'} eq "HASH" and $encrypt->{'CF'}{'StdCF'}{'CFM'}
1611 0 1 0 $] >= "5.006" and $et->{'OPTIONS'}{'EncodeHangs'} || eval { do { require Encode; &Encode::is_utf8($password) } } || $@
1758 0 0 0 $cryptInfo and $type ne "/XRef"
0 0 0 $cryptInfo and $type ne "/XRef" and $cryptInfo->{'_meta'} || $type ne '/Metadata'
1836 350 0 0 defined $unknown && !$unknown && $et->Options('ExtractEmbedded')
1847 172 112 66 $et->{'PDF_CAPTURE'} and $tagTablePtr->{'VARS'}
112 0 66 $et->{'PDF_CAPTURE'} and $tagTablePtr->{'VARS'} and $tagTablePtr->{'VARS'}{'CAPTURE'}
1854 31 35 0 $type and $type ne $name
1859 350 0 0 $et->Options('Validate') && $tagTablePtr eq \%Image::ExifTool::PDF::Info
1865 350 0 0 defined $next and not $next
1875 689 0 0 $embedded and $tag =~ /^(.*?)(\d+)$/
689 0 0 $embedded and $tag =~ /^(.*?)(\d+)$/ and $tagTablePtr->{$1}
0 0 0 $embedded and $tag =~ /^(.*?)(\d+)$/ and $tagTablePtr->{$1} and ref $val ne 'SCALAR' || !$fetched{$$val}
1882 0 0 0 ref $tagInfo eq "HASH" and $tagInfo->{'JoinStreams'}
1886 0 0 0 ref $obj eq "HASH" and $obj->{'_stream'}
1895 1123 0 0 $validInfo and $et->{'PDFVersion'} >= 2
0 0 0 $tagInfo && $tagInfo->{'PDF2'}
1123 0 0 $validInfo and $et->{'PDFVersion'} >= 2 and not $tagInfo && $tagInfo->{'PDF2'}
1903 0 0 0 $tag eq "Next" and not $next
1953 0 0 0 not $tagInfo and defined $val
0 0 0 not $tagInfo and defined $val and $unknown
1981 37 0 0 $tagInfo->{'ConvertToDict'} and @$val == 2
37 0 0 $tagInfo->{'ConvertToDict'} and @$val == 2 and not ref $val->[0]
2090 0 75 0 not $tagInfo->{'Binary'} and $val =~ /[\x18-\x1f\x80-\xff]/
2095 63 0 12 $tagInfo->{'List'} and not $et->{'OPTIONS'}{'NoPDFList'}
2127 0 0 0 defined $list->[1] and $list->[1] =~ /^%.*?([\x0d\x0a]*)/
2177 43 0 0 $cryptInfo and $cryptInfo->{'_aesv2'} || $cryptInfo->{'_aesv3'} && $dict->{'Length'} && $dict->{'Length'} > 10000
0 0 0 $cryptInfo and $cryptInfo->{'_aesv2'} || $cryptInfo->{'_aesv3'} && $dict->{'Length'} && $dict->{'Length'} > 10000 and not $dict->{'_decrypted'}
0 0 0 $cryptInfo and $cryptInfo->{'_aesv2'} || $cryptInfo->{'_aesv3'} && $dict->{'Length'} && $dict->{'Length'} > 10000 and not $dict->{'_decrypted'} and not $et->{'PDF_CAPTURE'}
2245 0 18 0 ref $dict eq "HASH" and $dict->{'Linearized'}
18 0 0 ref $dict eq "HASH" and $dict->{'Linearized'} and $dict->{'L'}
2365 0 33 37 $mainDict->{'Size'} and $mainDict->{'Size'} > $mainDictSize
2374 0 0 0 $mainDict->{'Type'} eq "/XRef" and $mainDict->{'W'}
0 0 0 $mainDict->{'Type'} eq "/XRef" and $mainDict->{'W'} and @{$mainDict->{'W'};} > 2
0 0 0 $mainDict->{'Type'} eq "/XRef" and $mainDict->{'W'} and @{$mainDict->{'W'};} > 2 and $mainDict->{'Size'}
0 0 0 $mainDict->{'Type'} eq "/XRef" and $mainDict->{'W'} and @{$mainDict->{'W'};} > 2 and $mainDict->{'Size'} and &DecodeStream($et, $mainDict)
2397 70 0 0 $encrypt and $encrypt eq "null"
2398 41 0 29 $mainDict->{'ID'} and ref $mainDict->{'ID'} eq "ARRAY"

or 2 conditions

line l !l condition
654 10 0 $3 || '00'
1521 4 0 $encrypt->{'V'} || 0
1522 3 1 $encrypt->{'R'} || 0
1526 3 1 $encrypt->{'Length'} || 40
1646 1 0 $encrypt->{'Length'} || 40
1755 0 0 $dict->{'Type'} || ''
1803 0 0 $dict->{'AFRelationship'} || ''
1841 280 70 $nesting || 0
2038 0 280 $subTablePtr->{'PROCESS_PROC'} || \&Image::ExifTool::PDF::ProcessDict
2054 0 0 $subTablePtr->{'PROCESS_PROC'} || \&Image::ExifTool::PDF::ProcessDict
2088 10 65 $tagInfo->{'Format'} || $tagInfo->{'Writable'} || 'string'
2161 0 0 $dict->{'Filter'} || ''
2181 0 0 $dict->{'Type'} || ''
2317 177 0 $raf->ReadLine($buff) or return -6

or 3 conditions

line l !l&&r !l&&!r condition
849 0 0 0 $$table[$i + 3] || length $obj->{'_stream'}
967 102 58 594 $delim eq "(" or $delim eq "<"
1118 0 434 0 $2 eq "(" or $2 eq ")"
1234 0 0 43 defined $dict->{'_decrypted'} or $filters[0] and $filters[0] eq "/Crypt"
1307 0 0 0 defined $name or $name eq "Identity"
1469 0 0 0 $i < 64 or $i < ord(substr $x, -1, 1) + 32
1545 1 0 3 $ver == 1 or $ver == 2
1 2 0 $ver == 4 or $ver == 5
1555 3 0 0 $cryptString or $cryptStream
1598 1 2 1 $ver < 4 or not $encrypt->{'EncryptMetadata'}
3 0 1 $ver < 4 or not $encrypt->{'EncryptMetadata'} or not $encrypt->{'EncryptMetadata'} =~ /false/i
1611 0 0 1 $et->{'OPTIONS'}{'EncodeHangs'} || eval { do { require Encode; &Encode::is_utf8($password) } } || $@
1616 0 0 0 $et->{'OPTIONS'}{'EncodeHangs'} || $@
1637 0 1 1 $rev == 3 or $rev == 4
1669 0 0 3 length $o < 48 or length $u < 48
1739 1 2 1 $cryptInfo->{'_aesv2'} or $cryptInfo->{'_aesv3'}
1758 0 0 0 $cryptInfo->{'_meta'} || $type ne '/Metadata'
1805 0 0 0 $et->Options("Verbose") or $et->{'AFRelationship'} eq "/C2PA_Manifest"
1875 0 0 0 ref $val ne 'SCALAR' || !$fetched{$$val}
1939 0 0 0 ref $_ eq "HASH" or ref $_ eq "SCALAR"
1957 0 0 0 $val2 || $val
2100 12 0 0 $comma or $semi
2164 0 0 0 $filter eq "/DCTDecode" or $filter eq "/JPXDecode"
2177 0 0 0 $cryptInfo->{'_aesv2'} || $cryptInfo->{'_aesv3'} && $dict->{'Length'} && $dict->{'Length'} > 10000
2182 0 0 0 $type ne "/Metadata" or $dict->{'Length'} > 100000