Condition Coverage

blib/lib/Text/Haml.pm
Criterion Covered Total %
condition 119 152 78.2


and 3 conditions

line !l l&&!r l&&r condition
23 0 0 22 defined $dir and -d $dir
0 0 22 defined $dir and -d $dir and -w _
262 657 12 6 defined $multiline_code_el and $line =~ /^[-!=%#.:]/
277 150 481 34 $prev and $prev->{'type'} eq 'filter'
278 8 4 1 $i + 1 < @lines and $line eq ''
324 551 0 12 defined $multiline_code_el and $line =~ s/^(.*)(\s\|\s*)$//
414 27 44 30 $type eq 'perl' and $line =~ s/^$attributes_end//
44 17 10 $type eq 'html' and $line =~ s/^$attributes_end2//
499 307 243 0 $el->{'type'} eq 'tag' and $line =~ s/$autoclose_token$// || grep({$el->{'name'} eq $_;} @AUTOCLOSE)
510 304 226 20 $line and $line =~ s/(\s*)$multiline_token$//
555 125 239 411 scalar @$lines and $lines->[-1] eq '}'
564 0 680 95 scalar @$lines and $lines->[-1] eq '{'
666 22 26 520 not exists $el->{'escape'} and $self->escape_html
26 20 2 exists $el->{'escape'} and $el->{'escape'} == 1
677 233 310 25 $prev_stack_el and $prev_stack_el->{'type'} eq 'comment'
678 5 12 8 $el->{'line'} and $prev_stack_el->{'level'} >= $el->{'level'}
690 121 175 255 $el->{'line'} and $prev_stack_el
296 188 67 $el->{'line'} and $prev_stack_el and $prev_stack_el->{'level'} >= $el->{'level'}
728 206 3 10 $el->{'autoclose'} && $self->format eq 'xhtml'
755 0 3 0 $value->{'type'} eq 'boolean' and $value->{'text'}
797 142 77 0 $el->{'text'} and $el->{'expr'}
0 114 28 $next_el and $next_el->{'level'} <= $el->{'level'}
830 121 66 145 $el->{'line'} and $el->{'type'} eq 'text'
857 0 32 9 $prev_el and $prev_el->{'level'} > $el->{'level'}
861 0 27 14 $next_el and $next_el->{'level'} > $el->{'level'}
936 0 12 113 $self->tape->[-1] and $self->tape->[-1]{'line'} eq ''
959 0 113 12 $lines[-1] and not $last_empty_line
961 0 0 12 $lines[-2] and $lines[-1] eq '}'
984 216 0 0 $text =~ /^\"/ and $text =~ /\"$/
1160 3 3 0 -e $self->cache_path and $self->_eq_mtime || $self->_eq_checksum
1214 7 0 1 'File::Spec'->file_name_is_absolute($path) and -r $path

or 2 conditions

line l !l condition
332 12 6 $multiline_code_el->{'text'} ||= ''
372 14 17 $el->{'name'} ||= 'div'
373 5 26 $el->{'class'} ||= []
379 8 5 $el->{'name'} ||= 'div'
415 3 0 $lines[++$i] || (last)
618 8 3 $self->{'helpers_options'}{$name} || {}
739 3 3 $el->{'class'} ||= []
749 1 2 $el->{'id'} ||= ''
1301 10 6 $type ||= ''
1302 1 15 $encoding ||= 'utf-8'

or 3 conditions

line l !l&&r !l&&!r condition
132 0 26 0 $self->{'helpers_arg'} ||= $self
278 21 0 13 $prev->{'level'} < $el->{'level'} or $i + 1 < @lines and $line eq ''
324 6 36 563 $line =~ s/^- \s*(.*)(\s\|\s*)$// or $line =~ s/^- \s*(.*)//
42 0 563 $line =~ s/^- \s*(.*)(\s\|\s*)$// or $line =~ s/^- \s*(.*)// or defined $multiline_code_el and $line =~ s/^(.*)(\s\|\s*)$//
331 12 6 0 $multiline_code_el ||= $el
460 5 2 7 $value eq 'true' or $value eq 'false'
499 4 11 228 $line =~ s/$autoclose_token$// || grep({$el->{'name'} eq $_;} @AUTOCLOSE)
513 2 4 14 not $tape->[-1] or ref $tape->[-1]{'text'} ne 'ARRAY'
515 6 0 0 $el->{'line'} ||= $line . "$1|"
666 520 0 48 not exists $el->{'escape'} and $self->escape_html or exists $el->{'escape'} and $el->{'escape'} == 1
755 25 1 3 $value->{'type'} eq 'text' or $value->{'type'} eq 'expr'
797 0 0 142 not $next_el or $next_el and $next_el->{'level'} <= $el->{'level'}
1160 2 0 1 $self->_eq_mtime || $self->_eq_checksum