Condition Coverage

lib/BATsh/CMD.pm
Criterion Covered Total %
condition 61 161 37.8


and 3 conditions

line !l l&&!r l&&r condition
30 7 0 0 $] < "5.006" and not defined &warnings::import
93 0 109 0 defined $rc and $rc eq "__EXIT__"
228 125 0 1 $ch eq "^" and not $in_q
235 0 123 2 not $in_q and $ch eq "&"
236 0 1 1 $j + 1 < $n and $chars[$j + 1] eq "&"
246 0 119 4 not $in_q and $ch eq "|"
247 0 4 0 $j + 1 < $n and $chars[$j + 1] eq "|"
0 0 4 $j + 1 < $n and $chars[$j + 1] ne ">"
294 0 0 1 $ERRORLEVEL == 0 and $cmd =~ /\S/
297 0 0 0 $ERRORLEVEL != 0 and $cmd =~ /\S/
369 1 0 1 defined $input_f and -f $input_f
426 1 0 0 defined $input_f and -f $input_f
449 2988 0 3 $ch eq "^" and not $in_q
458 158 2786 0 not $in_q and $ch eq '>' || $ch eq '<'
470 0 0 3 not $is_in and $i < $n
0 2 1 not $is_in and $i < $n and $chars[$i] eq ">"
472 0 3 3 $i < $n and $chars[$i] =~ /[ \t]/
475 0 3 0 $i < $n and $chars[$i] eq "\""
477 0 0 0 $i < $n and $chars[$i] ne "\""
481 3 0 72 $i < $n and not $chars[$i] =~ /[ \t]/
522 3 0 0 defined $in_file and $ok
535 0 0 3 defined $out_file and $ok
549 3 0 0 defined $err_file and $ok
580 0 0 160 defined $cmd and $cmd ne ""
633 0 0 0 defined $opts_ref->{'_pushd_stack'} and @{$opts_ref->{'_pushd_stack'};}
731 0 0 4 defined $v && $v =~ /^-?\d+$/
796 0 0 2 defined $path && -e $path
869 0 8 0 defined $first_content and $first_content =~ /\S/
876 0 19 2 $depth == 1 and $ls =~ /\A\)\s*ELSE\s*\(\s*\z/i
880 0 19 0 $depth == 1 and $ls =~ /\A\)\s*ELSE\s+(.+)\z/i
902 0 0 19 defined $body and $body =~ /\S/
918 0 28 0 defined $rc and $rc eq "__EXIT__"
957 0 2 9 $step > 0 and $v <= $end
2 0 0 $step < 0 and $v >= $end
1099 6 0 0 $usebackq and $source_str =~ /\A`([^`]*)`\z/
6 0 0 $usebackq and $source_str =~ /\A"([^"]*)"\z/
3 0 3 $source_str =~ /\A"([^"]*)"\z/ and not $usebackq
1157 0 7 1 $eol ne "" and $src_line =~ /\A\Q$eol\E/
1170 0 0 0 @tokens and $tokens[0] eq ""
1179 6 0 1 $want_star and @tokens > $token_indices[-1]
1328 0 0 0 defined $src and defined $dst
1353 0 0 0 defined $src and defined $dst
1387 0 0 0 defined $src and defined $dst

or 2 conditions

line l !l condition
1417 0 0 $rc >> 8 || 1

or 3 conditions

line l !l&&r !l&&!r condition
458 3 0 2783 $ch eq '>' || $ch eq '<'
601 0 0 4 $CMD eq "CD" or $CMD eq "CHDIR"
604 0 0 4 $CMD eq "DEL" or $CMD eq "ERASE"
606 0 0 4 $CMD eq "MKDIR" or $CMD eq "MD"
607 0 0 4 $CMD eq "RMDIR" or $CMD eq "RD"
608 0 0 4 $CMD eq "REN" or $CMD eq "RENAME"
957 9 0 2 $step > 0 and $v <= $end or $step < 0 and $v >= $end
1099 0 0 6 $source_str =~ /\A'([^']*)'\z/ or $usebackq and $source_str =~ /\A`([^`]*)`\z/
1276 0 0 0 $rest eq "" or $rest =~ m[\A/D\s*\z]i
1310 0 0 0 $e eq "." or $e eq ".."