Condition Coverage

blib/lib/Mail/SpamAssassin/HTML.pm
Criterion Covered Total %
condition 82 155 52.9


and 3 conditions

line !l l&&!r l&&r condition
108 7 0 0 $character_semantics_input && !$character_semantics_output
168 0 0 7 exists $self->{'elements'} and exists $self->{'tags'}
172 0 0 7 exists $self->{'elements_seen'} and exists $self->{'tags_seen'}
177 0 7 0 exists $self->{'tags'} and exists $self->{'obfuscation'}
266 6 1 0 exists $self->{'inside'}{'style'} and $self->{'inside'}{'style'} > 0
267 7 0 0 exists $self->{'inside'}{'script'} and $self->{'inside'}{'script'} > 0
416 0 0 0 @{$self->{'text_style'};} and $top = $self->{'text_style'}[-1]{'tag'}
417 0 0 0 $tag eq 'td' and $top eq 'font' || $top eq 'td'
0 0 0 $tag eq 'tr' and $top =~ /^(?:font|td|tr)$/
455 304 0 0 $tag eq 'basefont' and exists $attr->{'size'}
0 0 0 $tag eq 'basefont' and exists $attr->{'size'} and $attr->{'size'} =~ /^\s*(\d+)/
604 215 0 0 $display and lc $display eq 'none'
608 215 0 0 $visibility and lc $visibility eq 'hidden'
618 349 81 34 $tag eq 'font' and exists $attr->{'face'}
623 457 5 2 $tag eq 'img' and exists $self->{'inside'}{'a'}
5 1 1 $tag eq 'img' and exists $self->{'inside'}{'a'} and $self->{'inside'}{'a'} > 0
630 457 0 7 $tag eq 'img' and exists $attr->{'width'}
0 0 7 $tag eq 'img' and exists $attr->{'width'} and exists $attr->{'height'}
638 0 0 0 defined $2 and $2 eq '%'
642 0 0 0 defined $2 and $2 eq '%'
647 0 0 7 $width > 0 and $height > 0
652 464 0 0 $tag eq 'form' and exists $attr->{'action'}
672 462 0 2 $tag eq 'meta' and exists $attr->{'http-equiv'}
0 0 2 $tag eq 'meta' and exists $attr->{'http-equiv'} and exists $attr->{'content'}
0 1 1 $tag eq 'meta' and exists $attr->{'http-equiv'} and exists $attr->{'content'} and $attr->{'http-equiv'} =~ /Content-Type/i
1 0 1 $tag eq 'meta' and exists $attr->{'http-equiv'} and exists $attr->{'content'} and $attr->{'http-equiv'} =~ /Content-Type/i and $attr->{'content'} =~ /\bcharset\s*=\s*["']?([^"']+)/i
695 6 179 17 defined $self->{'text_whitespace'} && vec($self->{'text_whitespace'}, $#{$$self{'text'};}, 1)
0 17 185 @{$self->{'text'};} and not defined $self->{'text_whitespace'} && vec($self->{'text_whitespace'}, $#{$$self{'text'};}, 1)
0 185 0 defined $self->{'text_invisible'} && vec($self->{'text_invisible'}, $#{$$self{'text'};}, 1)
17 0 185 @{$self->{'text'};} and not defined $self->{'text_whitespace'} && vec($self->{'text_whitespace'}, $#{$$self{'text'};}, 1) and not defined $self->{'text_invisible'} && vec($self->{'text_invisible'}, $#{$$self{'text'};}, 1)
709 7 0 477 @{$self->{'text'};} and not $display{'invisible'}
7 184 293 @{$self->{'text'};} and not $display{'invisible'} and defined $self->{'text_whitespace'}
184 108 185 @{$self->{'text'};} and not $display{'invisible'} and defined $self->{'text_whitespace'} and vec $self->{'text_whitespace'}, $#{$$self{'text'};}, 1
729 485 0 0 exists $self->{'inside'}{'script'} and $self->{'inside'}{'script'} > 0
734 418 66 1 exists $self->{'inside'}{'style'} and $self->{'inside'}{'style'} > 0
739 93 274 117 exists $self->{'inside'}{'a'} and $self->{'inside'}{'a'} > 0
746 416 67 1 exists $self->{'inside'}{'title'} and $self->{'inside'}{'title'} > 0
762 330 147 0 $text =~ /^[^\s\x21-\x2f\x3a-\x40\x5b-\x60\x7b-\x7e]/s and $self->{'text'}[-1] =~ /[^\s\x21-\x2f\x3a-\x40\x5b-\x60\x7b-\x7e]\z/s
1045 3 96 0 length $color > 3 and length $color < 6
1122 58 34 0 defined $base_authority and not $base_path
1143 98 73 2 defined $r{'scheme'} and defined $base{'scheme'}
171 1 1 defined $r{'scheme'} and defined $base{'scheme'} and $r{'scheme'} eq $base{'scheme'}

or 2 conditions

line l !l condition
337 0 131 $self->{'base_href'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
280 824 0 0 exists $elements{$tag} or $maybe_namespace
295 824 0 0 exists $elements{$tag} or exists $tricks{$tag}
318 91 2 109 $tag eq 'br' or $tag eq 'div'
417 0 0 0 $top eq 'font' || $top eq 'td'
0 0 0 $tag eq 'td' and $top eq 'font' || $top eq 'td' or $tag eq 'tr' and $top =~ /^(?:font|td|tr)$/
463 8 7 289 $tag eq 'td' or $tag eq 'tr'
486 0 90 154 $name eq 'text' or $name eq 'color'
593 0 0 215 $fg eq 'invalid' or $bg eq 'invalid'
655 0 0 464 $tag eq 'object' or $tag eq 'embed'