Branch Coverage

blib/lib/App/sh2p/Parser.pm
Criterion Covered Total %
branch 0 162 0.0


line true false branch
164 0 0 if (defined $perl_builtins{$func}) { }
0 0 elsif (defined $ibuiltins{$func}) { }
195 0 0 if ($comment)
200 0 0 if ($heredoc)
206 0 0 if ($esc)
212 0 0 if ($variable)
213 0 0 if ($char =~ /[^A-Z0-9#\@*\$\-!\{\}\[\]]/i)
218 0 0 if ($char eq '$') { }
0 0 elsif ($char eq q[']) { }
0 0 elsif ($char eq '`') { }
0 0 elsif ($char eq '"') { }
0 0 elsif ($char eq '[') { }
0 0 elsif ($qs and $char eq ']') { }
0 0 elsif ($char eq '{') { }
0 0 elsif ($br and $char eq '}') { }
0 0 elsif ($char eq '\\') { }
222 0 0 $q ? :
225 0 0 $qx ? :
228 0 0 $qq ? :
257 0 0 if ($char eq '(') { }
0 0 elsif ($qp and $char eq ')') { }
265 0 0 if (not $q || $qq || $qx || $qp || $qs || $br) { }
266 0 0 if ($char eq '#' and not $variable)
270 0 0 if ($char =~ /\s/ and not $comment) { }
0 0 elsif ($char eq ';' and not $comment) { }
0 0 elsif ($char eq '<' and not $comment) { }
0 0 elsif ($char eq '>' and not $comment) { }
271 0 0 if defined $tokens[$index]
274 0 0 if defined $tokens[$index]
280 0 0 if (defined $tokens[$index]) { }
281 0 0 if ($tokens[$index] ne '<') { }
282 0 0 if defined $tokens[$index]
296 0 0 if (defined $tokens[$index] and $tokens[$index] ne '>') { }
297 0 0 if defined $tokens[$index]
314 0 0 if $comment
330 0 0 unless (@in)
339 0 0 if ($first =~ /^\w+\+?=/) { }
0 0 elsif ($first =~ /^\w+\[.*\]=/) { }
0 0 elsif (is_break($first)) { }
0 0 elsif (not $nested and $first =~ /^([\"]?)\$[A-Z0-9#\@*{}\[\]]+\1/i) { }
370 0 0 if (ref $token eq 'CODE') { }
0 0 elsif ($token =~ /^\w+=/) { }
0 0 elsif ($token =~ /^\w+\[.*\]=/) { }
0 0 elsif (exists $icompound{$token}) { }
0 0 elsif (exists $ioperator{$token} and $nested < 2) { }
0 0 elsif (exists $ibuiltins{$token} and $nested < 2) { }
0 0 elsif (exists $perl_builtins{$token} and $nested < 2) { }
405 0 0 if length $token > 1
406 0 0 if length $token > 2
408 0 0 if (exists $idelimiter{$three_chars}) { }
0 0 elsif (exists $idelimiter{$two_chars}) { }
0 0 elsif (exists $idelimiter{$first_char}) { }
0 0 elsif ($first_char eq '~') { }
0 0 elsif (!@out || $out[-1][0] eq 'BREAK' and not $nested and not is_break($first_char)) { }
0 0 elsif ($first_char eq '$' and $token =~ /^\$[A-Z0-9\#\@\*\?\{\}\[\]]+$/i) { }
0 0 elsif (is_break($token)) { }
0 0 elsif (exists $ioperator{$two_chars} and $nested) { }
0 0 elsif (exists $ioperator{$first_char} and $nested) { }
0 0 elsif ($token =~ /\[|\*|\?/ and not query_in_quotes()) { }
414 0 0 if ($two_chars eq '${' and !@out || $out[-1][0] eq 'BREAK' and not $nested and not is_break($first_char)) { }
425 0 0 if ($first_char eq '"' and !@out || $out[-1][0] eq 'BREAK' and not $nested and not is_break($first_char)) { }
481 0 0 if ($DEBUG)
489 0 0 if (@$rtok != @$rtype)
494 0 0 if is_break($$rtok[-1])
505 0 0 if (ref $sub eq 'CODE') { }
507 0 0 if ($type eq 'COMPOUND')
513 0 0 if ($tokens_processed > @$rtok)
524 0 0 if ($tokens_processed)
542 0 0 if not defined $next_type or $next_type ne 'BUILTIN'
547 0 0 if ($$rtok[$i] eq '<' or $$rtok[$i] eq '>' or $$rtok[$i] eq '>>')
549 0 0 unless (defined $$rtok[$i + 1])
585 0 0 if ($i < $#args)
586 0 0 if substr($args[$i + 1], 0, 1) eq '#'
587 0 0 if is_break($args[$i + 1])
588 0 0 if $args[$i + 1] eq ';'
617 0 0 if ($args[0] =~ s/^(echo |print )//)
625 0 0 unless ($args[$i])
637 0 0 if ($types[0][0] eq 'EXTERNAL' and $i < $#args)
642 0 0 if ($args[$i + 1] =~ /^\s*grep/)
657 0 0 if $i < $#args
660 0 0 unless App::sh2p::Compound::get_context()