Branch Coverage

blib/lib/App/sh2p/Handlers.pm
Criterion Covered Total %
branch 0 264 0.0


line true false branch
34 0 0 if (defined $special_var)
36 0 0 if ($special_var =~ s/^\$//) { }
45 0 0 if (substr($rhs, 0, 1) eq '(')
51 0 0 if (not defined $special_var and Register_variable($name)) { }
58 0 0 if (not defined $rhs) { }
60 0 0 if ($ntok == @_)
71 0 0 if (get_variable_type($name) eq 'int')
75 0 0 if ($rhs eq '') { }
0 0 elsif ($rhs =~ /^\d+$/) { }
76 0 0 if ($isa_int) { }
89 0 0 if ($isa_int)
94 0 0 if substr($tok, 0, 1) eq '#' or is_break($tok)
106 0 0 if $types[0] eq 'ASSIGNMENT'
111 0 0 if ($isa_int)
133 0 0 if (Register_variable($name, '@'))
147 0 0 if $elements[0] =~ /^\s*\[\d+\]=/
152 0 0 if (@initial) { }
154 0 0 if ($sign eq '+=') { }
155 0 0 if ($new)
162 0 0 unless ($new)
183 0 0 if ($elements[$i] =~ /^\s*\[(\d+)\]=(.*)/) { }
214 0 0 if (Register_variable($var, '$'))
231 0 0 unless (defined $rhs)
235 0 0 if (Register_variable("\@$arr", '@'))
240 0 0 if ($idx =~ /^[[:alpha:]_]/) { }
0 0 elsif ($idx =~ /^\D+$/) { }
257 0 0 if ($idx =~ /^\s*\$/)
264 0 0 if (not defined $rhs) { }
274 0 0 if $types[0] eq 'ARRAY_ASSIGNMENT'
311 0 0 if (Register_variable($var, '$'))
318 0 0 if ($type eq '>' or $type eq '>>') { }
333 0 0 if ($mode eq 'w') { }
342 0 0 if (defined $filename)
355 0 0 if ($mode eq 'w') { }
373 0 0 if ($new_token = get_special_var($token)) { }
0 0 elsif ($token =~ s/^\$#(\w+)(.*)/\$$1/) { }
0 0 elsif ($token =~ s/^\$!(\w+)\[.*\]/\@$1/) { }
0 0 elsif (substr($token, 0, 3) eq '$((') { }
0 0 elsif (substr($token, 0, 2) eq '$(') { }
0 0 elsif ($token =~ /\[(.+)\]/) { }
378 0 0 if ($suffix =~ /\[\s*[\*\@]\s*\]/) { }
409 0 0 if ($idx =~ /^[[:alpha:]_]/) { }
0 0 elsif ($idx eq '*' or $idx eq '@') { }
418 0 0 if (query_in_quotes()) { }
419 0 0 if ($idx eq '@') { }
456 0 0 if ($token =~ /\w+\[.*\]/) { }
0 0 elsif ($token =~ /(\w+)([:?\-=+]{1,2})([^:?\-=+]+)/) { }
0 0 elsif ($token =~ s/^\$#(.+)/\$$1/) { }
0 0 elsif ($token =~ /^(\$\w+)([%#]{1,2})(.*)/) { }
465 0 0 if (my $new_var = get_special_var($var))
473 0 0 if ($qual eq '?') { }
0 0 elsif ($qual eq '=') { }
0 0 elsif ($qual eq '-') { }
0 0 elsif ($qual eq '+') { }
474 0 0 unless ($extras)
515 0 0 if (my $new_var = get_special_var($var))
519 0 0 if ($mod eq '#') { }
0 0 elsif ($mod eq '##') { }
527 0 0 if ($mod eq '%') { }
0 0 elsif ($mod eq '%%') { }
542 0 0 if ($suffix)
565 0 0 if ($tok =~ /^\(\((.+)=(.+)\)\)$/) { }
0 0 elsif (substr($tok, 0, 1) eq '"') { }
0 0 elsif (substr($tok, 0, 1) eq q[']) { }
0 0 elsif ($tok =~ s/^\((.+)\)/$1/) { }
0 0 elsif ($tok eq ')' and $g_unterminated_backtick) { }
0 0 elsif ($tok eq ';') { }
0 0 elsif ($tok =~ /\|[^\|]/) { }
0 0 elsif ($tok =~ /^#/ and App::sh2p::Utils::new_line()) { }
0 0 elsif ($tok =~ /^(.*)\`\s*(.*)\s*\`(.*)/ and substr($tok, 0, 1) ne '"') { }
573 0 0 if ($tok eq '""') { }
597 0 0 if (@_)
611 0 0 if (@perlbi = App::sh2p::Parser::get_perl_builtin($cmd[0])) { }
614 0 0 if query_semi_colon
618 0 0 if ($rest)
619 0 0 unless ($preamble eq $rest and $rest eq '"' || $rest eq q['])
633 0 0 unless substr($tok, -1) eq "\n"
680 0 0 if ($string =~ /^(\'.*\')(.*)/)
684 0 0 if ($string) { }
693 0 0 if (substr($string, 0, 1) eq '"')
707 0 0 if ($chars[$i] eq '\\') { }
0 0 elsif ($chars[$i] eq '"' and not query_in_quotes()) { }
0 0 elsif ($chars[$i] eq '`') { }
0 0 elsif ($chars[$i] eq '$') { }
725 0 0 if $chars[$i] eq $delimiter
730 0 0 if $i < @chars - 1
736 0 0 if ($chars[$i] eq '(') { }
0 0 elsif ($chars[$i] eq '{') { }
742 0 0 if ($chars[$i] eq $delimiter)
748 0 0 if $i < @chars - 1
758 0 0 if ($chars[$i] eq '}')
764 0 0 if $i < @chars - 1
771 0 0 unless $chars[$i + 1] =~ /[a-z0-9\#\[\]\@\*]/i
778 0 0 if ($token =~ s/(\s+)$//)
782 0 0 unless can_var_interpolate($token)
786 0 0 unless can_var_interpolate($token)
788 0 0 if $whitespace
799 0 0 if ($chars[-1] ne $delimiter)
819 0 0 if ($tok =~ /^\$\((.*)\)(.*)$/) { }
0 0 elsif (substr($tok, 0, 2) eq '$(') { }
827 0 0 if $tok =~ /[|><&]/
829 0 0 if (not $shell and @perlbi = App::sh2p::Parser::get_perl_builtin($cmd[0])) { }
0 0 elsif (is_user_function($cmd[0])) { }
831 0 0 if query_semi_colon
842 0 0 if ($cmd =~ /\|[^\|]/)
846 0 0 if ($char eq q['] or $char eq '"')
847 0 0 $quote ? :
850 0 0 if $quote
851 0 0 if ($char eq '|')
858 0 0 if ($pipe) { }
859 0 0 if (substr($tok, 0, 2) eq '$(') { }
913 0 0 if (substr($args[-1], 0, 1) eq '#')
917 0 0 if ($g_unterminated_backtick) { }
918 0 0 if ($args[-1] eq ')') { }
937 0 0 if $tok =~ /^([\'\"]).*\1$/
938 0 0 if ($tok =~ /\|[^\|]/)
953 0 0 if ($types[$i][0] eq 'OPERATOR') { }
0 0 elsif ($types[$i][0] eq 'BREAK') { }
970 0 0 if (is_user_function($name)) { }
0 0 elsif (@perlbi = App::sh2p::Parser::get_perl_builtin($name)) { }
982 0 0 if (is_break($args[0]))
989 0 0 if query_semi_colon
994 0 0 if ($user_function) { }
996 0 0 if (@args)
1004 0 0 if $i < $#args
1022 0 0 if ($func eq 'system')
1024 0 0 if ($context eq 'if' or $context eq 'while') { }
0 0 elsif ($context eq 'until') { }
1034 0 0 if query_semi_colon
1060 0 0 if ($token =~ /^[-+]?\d+$/ or $token =~ /^\".*\"$/) { }
1083 0 0 if (%g_subs)
1095 0 0 if exists $g_subs{'sh2p_array_count'}