Branch Coverage

blib/lib/Bat/Interpreter.pm
Criterion Covered Total %
branch 88 108 81.4


line true false branch
52 0 23 if ($^O eq 'MSWin32')
58 23 0 if ($parse_tree) { }
70 21 129 if (exists $line->{'Label'})
90 107 24 if ($old_ip == $instruction_pointer)
108 4 127 if ($type eq 'Comment')
112 21 110 if ($type eq 'Label')
116 106 25 if ($type eq 'Statement')
130 132 0 if ($type eq 'Command')
142 132 0 if (defined $command and $command ne '') { }
145 29 103 if ($type eq 'SimpleCommand')
154 1 28 if ($command_line =~ m[^exit\s+/b]iu) { }
156 1 0 if (defined $stack_frame)
163 103 29 if ($type eq 'SpecialCommand')
182 25 78 if ($type eq 'If')
186 3 22 if (exists $special_command_line->{$type}{'NegatedCondition'}) { }
190 3 0 unless ($self->_handle_condition($condition, $context))
195 16 6 if ($self->_handle_condition($condition, $context))
202 21 82 if ($type eq 'Goto')
208 4 99 if ($type eq 'Call')
213 2 2 if ($token =~ /^:/u) { }
217 2 0 if ($first_word =~ /(\.[^.]+)$/u)
219 0 2 if ($extension eq '.exe') { }
2 0 elsif ($extension eq '.bat' or $extension eq '.cmd') { }
224 2 0 unless (defined $context->{'STDOUT'})
227 0 2 if (defined $stdout)
235 23 80 if ($type eq 'Set')
243 3 100 if ($type eq 'For')
248 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) { }
283 27 76 if ($type eq 'Echo')
286 23 4 if (exists $echo->{'EchoModifier'}) { }
302 21 4 if ($type eq 'Comparison') { }
4 0 elsif ($type eq 'Exists') { }
312 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') { }
347 0 107 unless (defined $context)
352 14 93 if (defined $parameters and scalar keys %$parameters > 0)
356 7 0 if (exists $parameters->{$parameter_name}) { }
370 27 12 if (defined $variable_name and $variable_name ne '') { }
373 27 0 if (defined $result) { }
374 5 22 if (defined $manipulation and $manipulation ne '')
376 2 3 if ($manipulation =~ /^~(?\d+),(?\d+)$/u) { }
1 2 elsif ($manipulation =~ /^~(?-\d+),(?\d+)$/u) { }
2 0 elsif ($manipulation =~ /^\~(\-\d)+$/u) { }
408 61 0 unless ($^O =~ /Win/u)
426 23 0 if ($context->{'LABEL_INDEX'}{$label}) { }
427 4 19 if ($label =~ /eof/iu) { }
429 1 3 if (defined $stack_frame) { }
435 2 17 if ($call)
455 131 2 if (defined $line and $line ne '')