Branch Coverage

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


line true false branch
52 0 25 if ($^O eq 'MSWin32')
58 25 0 if ($parse_tree) { }
70 21 133 if (exists $line->{'Label'})
90 111 24 if ($old_ip == $instruction_pointer)
108 4 131 if ($type eq 'Comment')
112 21 114 if ($type eq 'Label')
116 110 25 if ($type eq 'Statement')
130 136 0 if ($type eq 'Command')
142 136 0 if (defined $command and $command ne '') { }
145 30 106 if ($type eq 'SimpleCommand')
154 1 29 if ($command_line =~ m[^exit\s+/b]iu) { }
156 1 0 if (defined $stack_frame)
163 106 30 if ($type eq 'SpecialCommand')
182 25 81 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 85 if ($type eq 'Goto')
208 5 101 if ($type eq 'Call')
213 2 3 if ($token =~ /^:/u) { }
217 3 0 if ($first_word =~ /(\.[^.]+)$/u)
219 0 3 if ($extension eq '.exe') { }
3 0 elsif ($extension eq '.bat' or $extension eq '.cmd') { }
224 3 0 unless (defined $context->{'STDOUT'})
227 0 3 if (defined $stdout)
235 23 83 if ($type eq 'Set')
243 3 103 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 29 77 if ($type eq 'Echo')
286 25 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 109 unless (defined $context)
352 14 95 if (defined $parameters and scalar keys %$parameters > 0)
356 7 0 if (exists $parameters->{$parameter_name}) { }
370 28 12 if (defined $variable_name and $variable_name ne '') { }
373 28 0 if (defined $result) { }
374 5 23 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 63 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 135 3 if (defined $line and $line ne '')