Branch Coverage

blib/lib/App/sh2p/Builtins.pm
Criterion Covered Total %
branch 0 270 0.0


line true false branch
53 0 0 if (substr($args[-1], 0, 1) eq '#')
59 0 0 if query_semi_colon
64 0 0 if is_break($arg)
65 0 0 if $arg eq ';'
69 0 0 if ($arg eq '<<')
72 0 0 if (defined $heredoc)
84 0 0 unless ($arg =~ /^\d+$/ or $arg =~ /^([\'\"]).*\1$/ or $arg =~ /\[|\*|\?/)
97 0 0 if query_semi_colon
117 0 0 if $arg eq '|'
118 0 0 if $arg
134 0 0 if is_break($func) or $func eq ';' or $first_char eq '#'
136 0 0 if ($first_char eq '$') { }
159 0 0 if (query_semi_colon)
163 0 0 if (defined $level and $level =~ /^\d+$/)
177 0 0 if (not query_semi_colon) { }
197 0 0 if (query_semi_colon)
201 0 0 if (defined $level and $level =~ /^\d+$/)
217 0 0 unless $args[-1]
225 0 0 if (substr($args[$i], 0, 1) eq '#')
230 0 0 if $i > 0
235 0 0 unless ($args[$i] =~ /^\d+$/ or $args[$i] =~ /^\".*\"$/ or $args[$i] =~ /\[|\*|\?/)
244 0 0 if $i < $#args
252 0 0 if (query_semi_colon)
282 0 0 if $class eq 'a' or not $class
283 0 0 unless $access
292 0 0 if ($op eq '=') { }
0 0 elsif ($op eq '+') { }
319 0 0 if (substr($opt, 0, 1) eq '-') { }
334 0 0 unless ($perms =~ /^\d+$/)
344 0 0 if (defined $perms)
347 0 0 if ($cmd eq 'chmod') { }
0 0 elsif ($cmd eq 'umask') { }
357 0 0 if (@args and $cmd ne 'umask')
362 0 0 if (substr($args[$i], 0, 1) eq '#')
367 0 0 if $i > 0
379 0 0 if $i < $#args
399 0 0 if (substr($opt, 0, 1) eq '-') { }
414 0 0 if (defined $ugrp) { }
416 0 0 if ($cmd eq 'chown') { }
430 0 0 if (@args)
436 0 0 if (substr($args[$i], 0, 1) eq '#')
441 0 0 if $i > 0
449 0 0 if $i < $#args
467 0 0 if ($rest[0] =~ /^\d$/) { }
489 0 0 if (defined $arg) { }
511 0 0 if ($env =~ /^(\w+)=(.*)$/) { }
516 0 0 if ($value =~ /^\$/) { }
0 0 elsif ($value =~ /^\$/ or $value =~ /^([\"\']).*\1/) { }
518 0 0 if defined $special
550 0 0 if (query_semi_colon) { }
584 0 0 if (Register_variable("\$$var", 'int'))
602 0 0 if ($rest[0] =~ s/^-//) { }
628 0 0 if (substr($rest[-1], 0, 1) eq '#')
641 0 0 if (Register_variable($var, int $_))
670 0 0 if (substr($args[-1], 0, 1) eq '#')
678 0 0 if is_break($arg) or $arg eq ';'
682 0 0 if ($arg =~ /^([\"\']).*?\1/)
687 0 0 if (not query_in_quotes() and $arg =~ s/(\>{1,2})//)
693 0 0 if ($ARGV[-1] =~ /\d/)
700 0 0 if ($arg and $redirection and not $file)
703 0 0 unless $in_redirection_token
707 0 0 if $arg
711 0 0 if ($redirection) { }
0 0 elsif (App::sh2p::Handlers::Query_redirection('w')) { }
715 0 0 if ($file =~ /^\&(\d+)$/) { }
717 0 0 if ($fd == 1) { }
0 0 elsif ($fd == 2) { }
747 0 0 if (exists $options{'n'})
751 0 0 if ($name eq 'print')
752 0 0 if (exists $options{'p'})
756 0 0 if (exists $options{'u'} and defined $options{'u'})
758 0 0 if ($options{'u'} > $#handles) { }
773 0 0 if substr($args[-1], 0, 1) eq '#'
782 0 0 if ($args[$i] =~ s/^([\"])(.*)\1(.*)$/$2$3/)
791 0 0 if ($types[0][0] eq 'UNKNOWN' or $types[0][0] eq 'SINGLE_DELIMITER' or $types[0][0] eq 'TWO_CHAR_DELIMITER') { }
0 0 elsif ($types[0][0] eq 'OPERATOR') { }
798 0 0 if $i < $#args
806 0 0 if ($string)
813 0 0 if $i < $#args
819 0 0 if ($string and $string ne ' ') { }
0 0 elsif ($newline) { }
820 0 0 if ($newline)
830 0 0 if (@trailing_tokens) { }
843 0 0 if $redirection
863 0 0 if is_break($arg) or $arg eq ';'
870 0 0 if (exists $args{'p'} and which_shell() eq 'bash') { }
0 0 elsif ($ARGV[0] =~ /^(\w*)\?(.*)$/) { }
881 0 0 unless @ARGV
887 0 0 if (exists $args{'a'} or exists $args{'A'}) { }
0 0 elsif ($ARGV[$i] =~ s/^
889 0 0 if (Register_variable($ARGV[$i], '@'))
895 0 0 if (defined $ARGV[$i] and $ARGV[$i]) { }
902 0 0 if $i == $#ARGV
909 0 0 if (Register_variable($ARGV[$i], '$'))
915 0 0 if (exists $args{'p'} and which_shell() eq 'ksh')
924 0 0 if (defined $heredoc) { }
926 0 0 if (Register_variable('$IFS', '$'))
934 0 0 if (exists $args{'u'} and $args{'u'} ne 0) { }
939 0 0 if (@ARGV > 1)
944 0 0 if (Register_variable('$IFS', '$'))
950 0 0 if (defined $filename) { }
959 0 0 unless (App::sh2p::Compound::get_context())
981 0 0 if (defined $arg and substr($arg, 0, 1) ne '#' and substr($arg, 0, 1) ne ';')
1004 0 0 if (defined $level and $level =~ /^\d+$/ and not is_break($level)) { }
1026 0 0 if is_break($option) or $option eq ';' or substr($option, 0, 1) eq '#'
1032 0 0 if ($switch eq '-s') { }
0 0 elsif ($switch eq '+s') { }
1078 0 0 if (keys %args)
1085 0 0 if (substr($file, 0, 1) eq '#')
1119 0 0 if (keys %args)
1125 0 0 unless @ARGV
1131 0 0 if (@ARGV)
1141 0 0 if ($from eq '[a-z]' || $from eq '[:lower:]' and $to eq '[A-Z]' || $to eq '[:upper:]') { }
0 0 elsif ($from eq '[A-Z]' || $from eq '[:upper:]' and $to eq '[a-z]' || $to eq '[:lower:]') { }
1186 0 0 if (exists $type{$opt[0]})
1191 0 0 if (@opt > 1)
1192 0 0 if ($args{'Z'} and defined $args{'Z'}) { }
0 0 elsif ($args{'f'}) { }
1196 0 0 if ($args{'u'})
1212 0 0 if (Register_variable("\$$var", $type))
1237 0 0 if ($act eq '+' or $act eq '-') { }
0 0 elsif (is_break($option)) { }
1240 0 0 if ($set eq 'A')
1241 0 0 if ($act eq '-') { }
1261 0 0 if (@values)
1270 0 0 if ($values[$i] =~ /^[\"\']*\$/ and not get_special_var($values[$i])) { }
1278 0 0 if $i < $#values
1311 0 0 if (App::sh2p::Compound::get_context()) { }
1318 0 0 unless (defined $rest)
1331 0 0 if (App::sh2p::Compound::get_context()) { }
1338 0 0 unless (defined $rest)
1353 0 0 if (substr($var, 0, 1) eq '-')
1362 0 0 if ($option eq '-f')
1372 0 0 if (defined $var and substr($var, 0, 1) ne '#')
1376 0 0 if (get_special_var($var, 0)) { }