Condition Coverage

lib/BATsh/CMD.pm
Criterion Covered Total %
condition 67 167 40.1


and 3 conditions

line !l l&&!r l&&r condition
34 15 0 0 $] < "5.006" and not defined &warnings::import
97 0 283 1 defined $rc and $rc eq "__EXIT__"
238 125 0 1 $ch eq "^" and not $in_q
245 0 123 2 not $in_q and $ch eq "&"
246 0 1 1 $j + 1 < $n and $chars[$j + 1] eq "&"
256 0 119 4 not $in_q and $ch eq "|"
257 0 4 0 $j + 1 < $n and $chars[$j + 1] eq "|"
0 0 4 $j + 1 < $n and $chars[$j + 1] ne ">"
304 0 0 1 $ERRORLEVEL == 0 and $cmd =~ /\S/
307 0 0 0 $ERRORLEVEL != 0 and $cmd =~ /\S/
379 1 0 1 defined $input_f and -f $input_f
436 1 0 0 defined $input_f and -f $input_f
459 6250 0 3 $ch eq "^" and not $in_q
468 194 5938 0 not $in_q and $ch eq '>' || $ch eq '<'
480 0 0 3 not $is_in and $i < $n
0 2 1 not $is_in and $i < $n and $chars[$i] eq ">"
482 0 3 3 $i < $n and $chars[$i] =~ /[ \t]/
485 0 3 0 $i < $n and $chars[$i] eq "\""
487 0 0 0 $i < $n and $chars[$i] ne "\""
491 3 0 72 $i < $n and not $chars[$i] =~ /[ \t]/
532 3 0 0 defined $in_file and $ok
545 0 0 3 defined $out_file and $ok
559 3 0 0 defined $err_file and $ok
590 0 0 384 defined $cmd and $cmd ne ""
644 0 0 0 defined $opts_ref->{'_pushd_stack'} and @{$opts_ref->{'_pushd_stack'};}
742 0 0 4 defined $v && $v =~ /^-?\d+$/
807 0 0 2 defined $path && -e $path
880 0 8 0 defined $first_content and $first_content =~ /\S/
887 0 19 2 $depth == 1 and $ls =~ /\A\)\s*ELSE\s*\(\s*\z/i
891 0 19 0 $depth == 1 and $ls =~ /\A\)\s*ELSE\s+(.+)\z/i
913 0 0 28 defined $body and $body =~ /\S/
929 0 37 0 defined $rc and $rc eq "__EXIT__"
968 0 2 9 $step > 0 and $v <= $end
2 0 0 $step < 0 and $v >= $end
1110 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
1168 0 7 1 $eol ne "" and $src_line =~ /\A\Q$eol\E/
1181 0 0 0 @tokens and $tokens[0] eq ""
1190 6 0 1 $want_star and @tokens > $token_indices[-1]
1295 142 2 18 $c =~ /\s/ and not $in_q
1333 0 12 17 defined $v and $v ne ""
1408 0 0 0 defined $src and defined $dst
1433 0 0 0 defined $src and defined $dst
1467 0 0 0 defined $src and defined $dst

or 2 conditions

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

or 3 conditions

line l !l&&r !l&&!r condition
468 3 0 5935 $ch eq '>' || $ch eq '<'
612 0 0 5 $CMD eq "CD" or $CMD eq "CHDIR"
615 0 0 5 $CMD eq "DEL" or $CMD eq "ERASE"
617 0 0 5 $CMD eq "MKDIR" or $CMD eq "MD"
618 0 0 5 $CMD eq "RMDIR" or $CMD eq "RD"
619 0 0 5 $CMD eq "REN" or $CMD eq "RENAME"
968 9 0 2 $step > 0 and $v <= $end or $step < 0 and $v >= $end
1110 0 0 6 $source_str =~ /\A'([^']*)'\z/ or $usebackq and $source_str =~ /\A`([^`]*)`\z/
1356 0 0 0 $rest eq "" or $rest =~ m[\A/D\s*\z]i
1390 0 0 0 $e eq "." or $e eq ".."