Condition Coverage

lib/HP/Handy.pm
Criterion Covered Total %
condition 175 230 76.0


and 3 conditions

line !l l&&!r l&&r condition
21 12 0 0 $] < "5.006" and not defined &warnings::import
387 7 0 7 $merged and $passes-- > 0
587 1303 380 9 $tok->[0] eq "text" and $tok->[1] =~ /\Q$raw_ph\E/
620 670 633 52 $var_pos < 0 and $block_pos < 0
627 633 191 479 $var_pos >= 0 and $block_pos < 0 || $var_pos <= $block_pos
650 472 1 6 $strip_left and @tokens
473 0 6 $strip_left and @tokens and $tokens[-1][0] eq "text"
657 472 1 6 $strip_right and $pos < $len
688 822 0 2 $rstrip_tag and $pos < $len
698 2 806 16 not $rstrip_tag and $self->{'trim_blocks'}
806 5 11 not $rstrip_tag and $self->{'trim_blocks'} and $pos < $len
811 11 0 not $rstrip_tag and $self->{'trim_blocks'} and $pos < $len and substr($source, $pos, 1) eq "\n"
725 628 0 15 $self->{'auto_escape'} and defined $val
628 0 15 $self->{'auto_escape'} and defined $val and not ref $val
738 13 0 0 $stmt =~ /^(\w+)\s*\(([^)]*)\)$/ and exists $self->{'_macros'}{$1}
852 3 24 13 $depth == 1 and $content =~ /^elif\s+(.+)$/
3 8 16 $depth == 1 and $content eq "else"
914 2 6 10 $depth == 1 and $content eq "else"
917 25 0 125 $depth == 0 and $content eq "endfor"
1009 0 0 0 defined $cv && defined $pv
1070 0 0 0 $type eq "tag" and $content eq "endraw"
1117 0 0 2681 defined $expr and $expr ne ""
1128 2340 3 1 $expr =~ /^-(.+)$/ and not $1 =~ /^\d/
1203 251 322 4 not $in_sq2 || $in_dq2 and $c eq "'"
1204 553 16 4 $in_sq2 and $c eq "'"
1205 247 240 82 not $in_sq2 || $in_dq2 and $c eq "\""
1206 256 149 82 $in_dq2 and $c eq "\""
1241 0 0 107 defined $l and defined $r
1242 17 0 90 $l =~ /^-?(?:\d+\.?\d*|\.\d+)$/ && $r =~ /^-?(?:\d+\.?\d*|\.\d+)$/
1256 0 0 4 defined $l and defined $r
1269 72 6487 2 not $in_sq3 || $in_dq3 and $c eq "'"
1270 6552 5 2 $in_sq3 and $c eq "'"
1271 70 6461 26 not $in_sq3 || $in_dq3 and $c eq "\""
1272 6466 39 26 $in_dq3 and $c eq "\""
1281 46 0 12 $c eq "*" and $ci + 1 < length $expr
46 12 0 $c eq "*" and $ci + 1 < length $expr and substr($expr, $ci + 1, 1) eq "*"
1282 57 0 1 $c eq "/" and $ci + 1 < length $expr
57 1 0 $c eq "/" and $ci + 1 < length $expr and substr($expr, $ci + 1, 1) eq "/"
1293 0 0 58 defined $l and defined $r
1295 0 0 26 $l =~ /^-?\d/ && $r =~ /^-?\d/
1443 0 1 155 defined $str and $str =~ /\S/
1451 303 374 4 not $in_sq || $in_dq and $ch eq "'"
1452 657 16 4 $in_sq and $ch eq "'"
1453 299 275 99 not $in_sq || $in_dq and $ch eq "\""
1454 291 184 99 $in_dq and $ch eq "\""
1456 229 2 42 $ch eq "," and $depth == 0
1492 12 0 0 ref $val eq "SCALAR" and $$val == 1
1493 12 0 0 ref $val eq "SCALAR" and $$val == 0

or 2 conditions

line l !l condition
1415 4 0 $args[2] || 1

or 3 conditions

line l !l&&r !l&&!r condition
627 352 127 191 $block_pos < 0 || $var_pos <= $block_pos
738 0 0 0 $stmt =~ /^end(if|for|block|macro|raw|with|set)/ or $stmt =~ /^(else|elif)/
886 287 0 0 @cur_body or not defined $cur_cond
891 9 205 162 not defined $cond or $self->_eval_expr($cond, $vars)
1009 0 0 0 defined $cv || defined $pv
1120 2 1 2678 $expr eq "none" or $expr eq "None"
3 0 2678 $expr eq "none" or $expr eq "None" or $expr eq "undefined"
1121 3 0 2675 $expr eq "true" or $expr eq "True"
1122 4 0 2671 $expr eq "false" or $expr eq "False"
1134 198 5 2140 $expr =~ /^"((?:[^"\\]|\\.)*)"$/ or $expr =~ /^'((?:[^'\\]|\\.)*)'$/
1203 20 231 326 $in_sq2 || $in_dq2
1205 16 231 322 $in_sq2 || $in_dq2
1207 16 149 240 $in_sq2 or $in_dq2
1269 7 65 6489 $in_sq3 || $in_dq3
1271 5 65 6487 $in_sq3 || $in_dq3
1273 5 39 6461 $in_sq3 or $in_dq3
1274 55 26 6380 $c eq "(" or $c eq "["
81 1 6379 $c eq "(" or $c eq "[" or $c eq "{"
1275 51 26 6302 $c eq ")" or $c eq "]"
77 1 6301 $c eq ")" or $c eq "]" or $c eq "}"
1280 0 0 58 $prev =~ m[^[+\-*/%~(]$] or $prev eq ""
1451 20 283 378 $in_sq || $in_dq
1453 16 283 374 $in_sq || $in_dq
1455 16 184 275 $in_sq or $in_dq
1456 0 1 274 $ch eq "(" or $ch eq "["
1 0 274 $ch eq "(" or $ch eq "[" or $ch eq "{"
0 1 273 $ch eq ")" or $ch eq "]"
1 0 273 $ch eq ")" or $ch eq "]" or $ch eq "}"