Condition Coverage

lib/BATsh/SH.pm
Criterion Covered Total %
condition 114 277 41.1


and 3 conditions

line !l l&&!r l&&r condition
44 7 0 0 $] < "5.006" and not defined &warnings::import
189 0 0 113 defined $cmd and $cmd ne ""
327 2 0 0 defined $v && $v ne ''
337 0 0 0 defined $v && $v ne ''
360 0 0 5 defined $v and $v ne ""
374 0 0 0 defined $vv and $vv ne ""
375 0 0 0 defined $vv and $vv ne ""
412 0 0 5 defined $v and $v ne ""
413 0 0 5 defined $v && $v =~ /\A-?\d+\z/
419 0 0 8 defined $v && $v =~ /\A-?\d+\z/
442 1458 0 62 $ch eq "\$" and $i + 1 < $n
1458 62 0 $ch eq "\$" and $i + 1 < $n and $chars[$i + 1] eq "("
449 0 0 0 $i < $n and $depth > 0
456 0 0 0 $c eq "'" and not $in_dq
459 0 0 0 $c eq "\"" and not $in_sq
709 0 2 4 defined $v and $v ne ""
800 0 0 0 _eval_test($1) && _eval_test($2)
865 0 0 0 length $expr > 0 && $expr ne '0'
961 6 0 1 not $executed and defined $else_body
995 2 0 0 $lc_f eq "do" and $depth == 1
1041 2 0 0 $lc_f eq "do" and $depth == 1
1050 6 3 1 $is_until and $cond_true
1189 1371 0 0 $ch eq "'" and not $in_dq
1192 1345 0 26 $ch eq "\"" and not $in_sq
1210 1137 23 37 $ch =~ /[012]/ and $i + 2 < $n
1160 37 0 $ch =~ /[012]/ and $i + 2 < $n and $chars[$i + 1] eq ">"
60 0 0 $ch =~ /[012]/ and $i + 2 < $n and $chars[$i + 1] eq ">" and $i + 3 < $n ? $chars[$i + 2] eq ">" : 0
0 0 0 $ch =~ /[012]/ and $i + 2 < $n and $chars[$i + 1] eq ">" and $i + 3 < $n ? $chars[$i + 2] eq ">" : 0 and $chars[$i + 3] eq "&"
1218 0 0 0 $j < $n and $chars[$j] =~ /\S/
1222 1137 23 37 $ch =~ /[012]/ and $i + 2 < $n
1160 37 0 $ch =~ /[012]/ and $i + 2 < $n and $chars[$i + 1] eq ">"
60 0 0 $ch =~ /[012]/ and $i + 2 < $n and $chars[$i + 1] eq ">" and $chars[$i + 2] eq "&"
1227 0 0 0 $j < $n and $chars[$j] =~ /\S/
1234 1137 18 42 $ch =~ /[012]/ and $i + 1 < $n
1155 42 0 $ch =~ /[012]/ and $i + 1 < $n and $chars[$i + 1] eq ">"
1240 0 0 0 $j < $n and $chars[$j] eq " "
1242 0 0 0 $j < $n and not $chars[$j] =~ /[\s<>]/
1253 0 0 0 $i + 1 < $n and $chars[$i + 1] eq ">"
1256 0 0 0 $i < $n and $chars[$i] eq " "
1259 0 0 0 $i < $n and not $chars[$i] =~ /[\s<>]/
1303 0 0 0 defined $in_file and $ok
1317 0 0 0 defined $out_file and $ok
0 0 0 $out_to_stderr and $ok
1339 0 0 0 defined $err_file and $ok
0 0 0 $err_to_stdout and $ok
1394 1812 0 0 $ch eq "'" and not $in_dq
1397 1782 0 30 $ch eq "\"" and not $in_sq
1401 202 0 18 $ch eq "\$" and $i + 1 < $n
202 18 0 $ch eq "\$" and $i + 1 < $n and $chars[$i + 1] eq "("
208 12 0 $ch eq ")" and $depth > 0
1407 1513 0 49 $ch eq "\$" and $i + 1 < $n
1513 38 11 $ch eq "\$" and $i + 1 < $n and $chars[$i + 1] eq "("
1410 1529 11 11 $ch eq ")" and $depth > 0
1424 1431 0 3 $ch eq "&" and $i + 1 < $n
1431 0 3 $ch eq "&" and $i + 1 < $n and $chars[$i + 1] eq "&"
1431 1425 0 6 $ch eq "|" and $i + 1 < $n
1425 4 2 $ch eq "|" and $i + 1 < $n and $chars[$i + 1] eq "|"
1474 2 0 1 $LAST_STATUS == 0 and $cmd =~ /\S/
1479 0 0 2 $LAST_STATUS != 0 and $cmd =~ /\S/
1517 1694 0 30 $ch eq "\"" and not $in_sq
1524 202 0 18 $ch eq "\$" and $i + 1 < $n
202 18 0 $ch eq "\$" and $i + 1 < $n and $chars[$i + 1] eq "("
1527 208 12 0 $ch eq ")" and $depth > 0
1542 1425 0 49 $ch eq "\$" and $i + 1 < $n
1425 38 11 $ch eq "\$" and $i + 1 < $n and $chars[$i + 1] eq "("
1552 1415 0 4 $ch eq "|" and $depth == 0
1554 0 4 0 $i + 1 < $n and $chars[$i + 1] eq "|"
1597 3 0 4 defined $input_f and -f $input_f
1663 3 0 0 defined $input_f and -f $input_f
1686 0 0 0 $i < $n and $chars[$i] ne "]"
1765 0 5 1 $depth >= 1 and $line =~ /\{(.*)\}\s*\z/s
1877 14 0 0 $ch eq "'" and not $in_dq
1878 14 0 0 $ch eq "\"" and not $in_sq
1879 13 0 1 $ch =~ /\s/ and not $in_sq
13 0 1 $ch =~ /\s/ and not $in_sq and not $in_dq

or 2 conditions

line l !l condition
630 0 0 $ENV{'HOME'} || 'BATsh::Env'->get('HOME') || '.'
1898 2 0 $rc >> 8 || 1

or 3 conditions

line l !l&&r !l&&!r condition
99 0 0 132 $_BREAK or $_RETURN
124 1 1 112 $first eq "while" or $first eq "until"
215 0 16 14 $lc_cmd eq "test" or $cmd eq "["
216 0 0 14 $lc_cmd eq "source" or $cmd eq "."
332 0 0 0 not defined $v or $v eq ""
629 0 0 0 $rest eq "" or $rest eq "~"
803 0 0 0 _eval_test($1) || _eval_test($2)
821 1 0 0 !defined($s) || $s == 0
831 0 0 0 $op eq "=" or $op eq "=="
993 0 0 4 $lc_f eq "for" or $lc_f eq "while"
0 0 4 $lc_f eq "for" or $lc_f eq "while" or $lc_f eq "until"
1005 0 0 6 $_BREAK or defined $_EXIT_CODE
1039 0 0 4 $lc_f eq "for" or $lc_f eq "while"
0 0 4 $lc_f eq "for" or $lc_f eq "while" or $lc_f eq "until"
1051 3 5 1 $is_until or $cond_true
1885 4 0 0 $cur ne "" or @args