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 8 0 0 $character_semantics_input && !$character_semantics_output
168 0 0 8 exists $self->{'elements'} and exists $self->{'tags'}
172 0 0 8 exists $self->{'elements_seen'} and exists $self->{'tags_seen'}
177 0 8 0 exists $self->{'tags'} and exists $self->{'obfuscation'}
274 7 1 0 exists $self->{'inside'}{'style'} and $self->{'inside'}{'style'} > 0
275 8 0 0 exists $self->{'inside'}{'script'} and $self->{'inside'}{'script'} > 0
427 0 0 0 @{$self->{'text_style'};} and $top = $self->{'text_style'}[-1]{'tag'}
428 0 0 0 $tag eq "td" and $top eq 'font' || $top eq 'td'
0 0 0 $tag eq "tr" and $top =~ /^(?:font|td|tr)$/
466 390 0 0 $tag eq "basefont" and exists $attr->{'size'}
0 0 0 $tag eq "basefont" and exists $attr->{'size'} and $attr->{'size'} =~ /^\s*(\d+)/
623 300 0 0 $display and lc $display eq "none"
627 300 0 0 $visibility and lc $visibility eq "hidden"
637 438 81 34 $tag eq "font" and exists $attr->{'face'}
651 546 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
658 546 0 7 $tag eq "img" and exists $attr->{'width'}
0 0 7 $tag eq "img" and exists $attr->{'width'} and exists $attr->{'height'}
666 0 0 0 defined $2 and $2 eq "%"
670 0 0 0 defined $2 and $2 eq "%"
675 0 0 7 $width > 0 and $height > 0
680 553 0 0 $tag eq "form" and exists $attr->{'action'}
700 550 0 3 $tag eq "meta" and exists $attr->{'http-equiv'}
0 0 3 $tag eq "meta" and exists $attr->{'http-equiv'} and exists $attr->{'content'}
0 1 2 $tag eq "meta" and exists $attr->{'http-equiv'} and exists $attr->{'content'} and $attr->{'http-equiv'} =~ /Content-Type/i
1 0 2 $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
723 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)
737 8 0 653 @{$self->{'text'};} and not $display{'invisible'}
8 360 293 @{$self->{'text'};} and not $display{'invisible'} and defined $self->{'text_whitespace'}
360 108 185 @{$self->{'text'};} and not $display{'invisible'} and defined $self->{'text_whitespace'} and vec $self->{'text_whitespace'}, $#{$$self{"text"};}, 1
757 662 0 0 exists $self->{'inside'}{'script'} and $self->{'inside'}{'script'} > 0
762 595 66 1 exists $self->{'inside'}{'style'} and $self->{'inside'}{'style'} > 0
767 98 361 202 exists $self->{'inside'}{'a'} and $self->{'inside'}{'a'} > 0
774 593 67 1 exists $self->{'inside'}{'title'} and $self->{'inside'}{'title'} > 0
793 421 232 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
1076 3 96 0 length $color > 3 and length $color < 6
1153 115 34 0 defined $base_authority and not $base_path
1174 155 186 2 defined $r{'scheme'} and defined $base{'scheme'}
341 1 1 defined $r{'scheme'} and defined $base{'scheme'} and $r{'scheme'} eq $base{'scheme'}

or 2 conditions

line l !l condition
345 0 301 $self->{'base_href'} || ''

or 3 conditions

line l !l&&r !l&&!r condition
288 1001 0 0 exists $elements{$tag} or $maybe_namespace
303 1001 0 0 exists $elements{$tag} or exists $tricks{$tag}
326 91 2 109 $tag eq "br" or $tag eq "div"
428 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)$/
474 8 7 375 $tag eq "td" or $tag eq "tr"
497 0 90 154 $name eq "text" or $name eq "color"
612 0 0 300 $fg eq "invalid" or $bg eq "invalid"
683 0 0 553 $tag eq "object" or $tag eq "embed"