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'})
91 120 24 if ($old_ip == $instruction_pointer)
109 4 140 if ($type eq 'Comment')
113 21 123 if ($type eq 'Label')
117 119 25 if ($type eq 'Statement')
131 149 0 if ($type eq 'Command')
143 149 0 if (defined $command and $command ne '') { }
146 34 115 if ($type eq 'SimpleCommand')
155 1 33 if ($command_line =~ m[^exit\s+/b]iu) { }
157 1 0 if (defined $stack_frame)
164 115 34 if ($type eq 'SpecialCommand')
183 29 86 if ($type eq 'If')
187 5 24 if (exists $special_command_line->{$type}{'NegatedCondition'}) { }
191 5 0 unless ($self->_handle_condition($condition, $context))
196 18 6 if ($self->_handle_condition($condition, $context))
203 21 94 if ($type eq 'Goto')
209 5 110 if ($type eq 'Call')
214 2 3 if ($token =~ /^:/u) { }
218 3 0 if ($first_word =~ /(\.[^.]+)$/u)
220 0 3 if ($extension eq '.exe') { }
3 0 elsif ($extension eq '.bat' or $extension eq '.cmd') { }
225 3 0 unless (defined $context->{'STDOUT'})
228 0 3 if (defined $stdout)
236 24 91 if ($type eq 'Set')
244 3 112 if ($type eq 'For')
249 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) { }
284 33 82 if ($type eq 'Echo')
287 27 6 if (exists $echo->{'EchoModifier'}) { }
303 21 8 if ($type eq 'Comparison') { }
8 0 elsif ($type eq 'Exists') { }
313 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') { }
340 6 2 if (@paths) { }
359 0 120 unless (defined $context)
364 14 106 if (defined $parameters and scalar keys %$parameters > 0)
368 7 0 if (exists $parameters->{$parameter_name}) { }
382 29 12 if (defined $variable_name and $variable_name ne '') { }
385 29 0 if (defined $result) { }
386 5 24 if (defined $manipulation and $manipulation ne '')
388 2 3 if ($manipulation =~ /^~(?\d+),(?\d+)$/u) { }
1 2 elsif ($manipulation =~ /^~(?-\d+),(?\d+)$/u) { }
2 0 elsif ($manipulation =~ /^\~(\-\d)+$/u) { }
420 72 0 unless ($^O =~ /Win/u)
438 23 0 if ($context->{'LABEL_INDEX'}{$label}) { }
439 4 19 if ($label =~ /eof/iu) { }
441 1 3 if (defined $stack_frame) { }
447 2 17 if ($call)
467 144 3 if (defined $line and $line ne '')