Branch Coverage

blib/lib/HTML/Lint/Parser.pm
Criterion Covered Total %
branch 71 72 98.6


line true false branch
80 91 5 if ($self->_displayable($errorcode))
92 87 9 if (not defined $directives->{$errorcode}) { }
108 29 147 unless ($self->{'_first_seen'}{$tag})
123 525 3 if ($validattr) { }
128 1 629 if ($seen{$attr}++)
132 4 626 unless ($validattr->{$attr})
142 401 127 unless $HTML::Tagset::emptyElement{$tag}
144 291 237 if (my $where = $self->{'_first_seen'}{$tag}) { }
145 1 290 if ($HTML::Lint::Parser::isNonrepeatable{$tag})
158 53 475 if ($self->can($tagfunc))
176 44 1347 unless ($self->{'_entity_lookup'})
195 4 86 if ($match eq '') { }
6 80 elsif (not $match =~ /;$/) { }
12 68 elsif ($match =~ /^#(\d+);$/) { }
3 65 elsif ($match =~ /^#x([\dA-F]+);$/i) { }
199 5 1 if (exists $self->{'_entity_lookup'}{$match} or $match =~ /^#(\d+)$/ or $match =~ /^#x[\dA-F]+$/i) { }
215 4 61 unless (exists $self->{'_entity_lookup'}{$match})
228 14 15 if ($tagname =~ /^\s*html-lint\s*(.+)\s*$/)
237 1 14 if ($directive ne 'all' and not exists $HTML::Lint::Error::errors{$directive})
247 1 13 unless (defined $normalized_value)
256 3 10 if ($directive eq 'all') { }
285 4 9 if $what eq '1' or $what eq 'on' or $what eq 'true'
286 7 1 if $what eq '0' or $what eq 'off' or $what eq 'false'
303 12 379 if (not $tokenpos) { }
1 378 elsif ($HTML::Tagset::emptyElement{$tag}) { }
311 374 4 if ($self->_in_context($tag)) { }
317 12 14 unless $HTML::Tagset::optionalEndTag{$tag}
327 0 391 if ($self->can($tagfunc))
350 748 60 if ($stack->[$offset][0] eq $tag)
363 44 330 unless my $offset = $self->_find_tag_in_stack($tag)
384 36 7 if (defined $h and defined $w) { }
390 8 35 unless (defined $attr{'alt'})
401 9 1 if (defined $type and lc $type eq 'image')
403 5 4 if ($ok)
408 6 3 unless ($ok)
410 3 3 unless defined $name