Branch Coverage

blib/lib/Mail/SpamAssassin/Plugin/MIMEEval.pm
Criterion Covered Total %
branch 1 174 0.5


line true false branch
96 0 0 if $numlos <= $numhis
120 0 0 unless exists $pms->{'mime_checked_attachments'}
121 0 0 unless exists $pms->{'mime_ascii_text_illegal'}
145 0 0 unless $ratio =~ /^\d{0,3}\.\d{1,3}$/
147 0 0 unless exists $pms->{'mime_checked_attachments'}
148 0 0 unless exists $pms->{'mime_text_unicode_ratio'}
159 0 0 if grep {$_ eq "all";} @locales
161 0 0 if defined $type
163 0 0 if (defined $type and not Mail::SpamAssassin::Locales::is_charset_ok_for_locales($type, @locales))
172 0 0 if ($self->are_more_high_bits_set($body))
183 0 0 unless exists $pms->{'mime_checked_attachments'}
184 0 0 unless exists $pms->{$test}
193 0 0 if $ctype =~ m[^text/html]i
195 0 0 unless exists $pms->{'mime_checked_attachments'}
196 0 0 unless exists $pms->{'mime_body_html_count'}
205 0 0 if $ctype =~ m[^text/html]i
207 0 0 unless exists $pms->{'mime_checked_attachments'}
208 0 0 unless exists $pms->{'mime_body_html_count'}
209 0 0 unless exists $pms->{'mime_body_text_count'}
217 0 0 unless exists $pms->{'mime_checked_attachments'}
218 0 0 unless exists $pms->{'mime_multipart_ratio'}
228 0 0 if ($ctype eq 'text/html') { }
0 0 elsif ($ctype =~ /^text/i) { }
235 0 0 if ($cte =~ /base64/) { }
0 0 elsif ($cte =~ /quoted-printable/) { }
242 0 0 if ($cd and $cd =~ /attachment/)
246 0 0 if ($ctype =~ /^text/ and $cte =~ /base64/ and !$charset || $charset =~ /(?:us-ascii|ansi_x3\.4-1968|iso-ir-6|ansi_x3\.4-1986|iso_646\.irv:1991|ascii|iso646-us|us|ibm367|cp367|csascii)/ and not $cd && $cd =~ /^(?:attachment|inline)/)
254 0 0 if ($charset =~ /iso-\S+-\S+\b/i and not $charset =~ /iso-(?:8859-\d{1,2}|2022-(?:jp|kr))\b/)
281 0 0 if ($charset =~ /[a-z]/i)
282 0 0 if (defined $pms->{'mime_html_charsets'}) { }
288 0 0 if (not $pms->{'mime_faraway_charset'})
291 0 0 if (not grep({$_ eq 'all';} @l) || Mail::SpamAssassin::Locales::is_charset_ok_for_locales($charset, @l))
346 0 0 if ($ctype eq "multipart/alternative")
351 0 0 defined $cte ? :
354 0 0 defined $cd ? :
356 0 0 if $charset
357 0 0 if $name
363 0 0 unless ($p->is_leaf)
369 0 0 unless $cd =~ /attachment/
388 0 0 if ($pms->{'mime_multipart_alternative'} and not $cd =~ /attachment/ and $ctype eq 'text/plain' || $ctype eq 'text/html')
393 0 0 if ($where != 1 and $cte eq "quoted-printable" and not /^SPAM: /)
403 0 0 if (length $_ > 79)
418 0 0 if (index($_, "=") != -1)
421 0 0 if ($qp)
426 0 0 if ($trailing)
436 0 0 if ($ctype eq "text/plain" and !defined($charset) || $charset eq 'us-ascii')
438 0 0 if (/[\x00\x0d\x80-\xff]+/)
439 0 0 if (would_log("dbg", "eval"))
450 0 0 if ($ctype eq "text/plain" and $cte eq '' || $cte eq '7bit' || $cte eq '8bit')
457 0 0 if ($subs and would_log("dbg", "eval"))
459 0 0 if length $str > 512
468 0 0 if ($qp_bytes)
474 0 0 if ($normal_chars)
478 0 0 if ($pms->{'mime_multipart_alternative'})
483 0 0 unless defined $part_bytes[$i]
484 0 0 if (not defined $html and $part_type[$i] eq 'text/html') { }
0 0 elsif (not defined $text and $part_type[$i] eq 'text/plain') { }
490 0 0 if defined $html and defined $text
492 0 0 if (defined $text and defined $html and $html > 0)
499 0 0 if ($val != 0)
526 0 0 unless exists $pms->{'mime_checked_attachments'}
527 0 0 unless exists $pms->{'mime_qp_ratio'}
533 0 0 defined $qp_ratio && $qp_ratio >= $min ? :
539 0 81 if ref $type
547 0 0 if (exists $pms->{'uppercase'})
551 0 0 if ($self->body_charset_is_likely_to_fp($pms))
564 0 0 unless /\S\s+\S/
566 0 0 if m[^(?:[A-Za-z0-9+/=]{60,76} ){2}]
582 0 0 if ($len < 200)
586 0 0 if ($upper + $lower == 0) { }
601 0 0 unless exists $pms->{'mime_checked_attachments'}
604 0 0 if defined $type
605 0 0 if defined $type
606 0 0 if (defined $pms->{'mime_html_charsets'})
612 0 0 if ($charset =~ /^$CHARSETS_LIKELY_TO_FP_AS_CAPS$/)
621 0 0 unless (defined $type)
622 0 0 if ($type =~ /charset="([^"]+)"/i)
623 0 0 if ($type =~ /charset='([^']+)'/i)
624 0 0 if ($type =~ /charset=(\S+)/i)
635 0 0 if lc $p->{'type'} eq "multipart/related"
636 0 0 if lc $p->{'type'} eq "application/rtf"
637 0 0 if $p->{'type'} =~ m[^text/]i
652 0 0 unless (defined $pms->{'base64_length'})
656 0 0 if defined $max and $pms->{'base64_length'} > $max
672 0 0 if $ctype eq "application/ics"
675 0 0 unless $cte =~ /^base64$/
677 0 0 if length $l > $result