Branch Coverage

blib/lib/Bat/Interpreter.pm
Criterion Covered Total %
branch 90 110 81.8


line true false branch
53 0 27 if ($^O eq "MSWin32")
59 27 0 if ($parse_tree) { }
71 21 142 if (exists $line->{'Label'})
92 120 24 if ($old_ip == $instruction_pointer)
110 4 140 if ($type eq "Comment")
114 21 123 if ($type eq "Label")
118 119 25 if ($type eq "Statement")
132 149 0 if ($type eq "Command")
144 149 0 if (defined $command and $command ne '') { }
147 34 115 if ($type eq "SimpleCommand")
156 1 33 if ($command_line =~ m[^exit\s+/b]iu) { }
158 1 0 if (defined $stack_frame)
165 115 34 if ($type eq "SpecialCommand")
184 29 86 if ($type eq "If")
188 5 24 if (exists $special_command_line->{$type}{'NegatedCondition'}) { }
192 5 0 unless ($self->_handle_condition($condition, $context))
197 18 6 if ($self->_handle_condition($condition, $context))
204 21 94 if ($type eq "Goto")
210 5 110 if ($type eq "Call")
215 2 3 if ($token =~ /^:/u) { }
219 3 0 if ($first_word =~ /(\.[^.]+)$/u)
221 0 3 if ($extension eq '.exe') { }
3 0 elsif ($extension eq '.bat' or $extension eq '.cmd') { }
226 3 0 unless (defined $context->{'STDOUT'})
229 0 3 if (defined $stdout)
237 24 91 if ($type eq "Set")
245 3 112 if ($type eq "For")
250 1 2 if ($token =~ m[\s*?/F\s*?"delims="\s*%%(?[A-Z0-9]+?)\s*?in\s*?\('(?.+)'\)]iu) { }
2 0 elsif ($token =~ /\s*?%%(?[A-Z0-9]+?)\s*?in\s*?(\([\d]+(?:,[^,\s]+)+\))/iu) { }
285 33 82 if ($type eq "Echo")
288 27 6 if (exists $echo->{'EchoModifier'}) { }
304 21 8 if ($type eq 'Comparison') { }
8 0 elsif ($type eq 'Exists') { }
314 7 14 if ($operator eq '==' or $uppercase_operator eq 'EQU') { }
2 12 elsif ($uppercase_operator eq 'NEQ') { }
1 11 elsif ($uppercase_operator eq 'LSS') { }
2 9 elsif ($uppercase_operator eq 'LEQ') { }
2 7 elsif ($uppercase_operator eq 'GTR') { }
7 0 elsif ($uppercase_operator eq 'GEQ') { }
341 6 2 if (@paths) { }
360 0 120 unless (defined $context)
365 14 106 if (defined $parameters and scalar keys %$parameters > 0)
369 7 0 if (exists $parameters->{$parameter_name}) { }
383 29 12 if (defined $variable_name and $variable_name ne '') { }
386 29 0 if (defined $result) { }
387 5 24 if (defined $manipulation and $manipulation ne "")
389 2 3 if ($manipulation =~ /^~(?\d+),(?\d+)$/u) { }
1 2 elsif ($manipulation =~ /^~(?-\d+),(?\d+)$/u) { }
2 0 elsif ($manipulation =~ /^\~(\-\d)+$/u) { }
421 72 0 unless ($^O =~ /Win/u)
439 23 0 if ($context->{'LABEL_INDEX'}{$label}) { }
440 4 19 if ($label =~ /eof/iu) { }
442 1 3 if (defined $stack_frame) { }
448 2 17 if ($call)
468 144 3 if (defined $line and $line ne "")