Branch Coverage

blib/lib/Complete/File.pm
Criterion Covered Total %
branch 76 106 71.7


line true false branch
133 0 13 if ($handle_tilde and $word =~ s[\A(~[^/]*)/][]) { }
0 13 elsif ($allow_dot and $word =~ s[\A((?:\.\.?/+)+|/+)][]) { }
136 0 0 unless @dir
142 0 0 unless $starting_path =~ m[\A/]
146 0 13 if not $allow_dot and $word =~ m[(?:\A|/)\.\.?(?:\z|/)]
152 0 24 unless opendir my $dh, $path
156 20 186 if $_ eq '.' || $_ eq '..' and $intdir eq ''
157 28 158 if $isint and not -d "$path/$_"
167 2 11 if ($args{'filter'} and not ref $args{'filter'}) { }
1 20 elsif ($args{'filter'} and ref $args{'filter'} eq 'CODE') { }
171 0 6 unless my(@st) = stat $name
178 3 1 $_[0] ? :
4 7 if ($c eq '-') { }
0 7 elsif ($c eq 'r') { }
0 7 elsif ($c eq 'w') { }
0 7 elsif ($c eq 'x') { }
1 6 elsif ($c eq 'f') { }
6 0 elsif ($c eq 'd') { }
179 0 0 unless &$neg($mode & 256)
180 0 0 unless &$neg($mode & 128)
181 0 0 unless &$neg($mode & 64)
182 1 0 unless &$neg($mode & 32768)
183 3 3 unless &$neg($mode & 16384)
198 1 12 if ($args{'file_regex_filter'})
201 4 7 if -d $name
202 0 7 unless -f _
203 2 5 if $name =~ /$args{'file_regex_filter'}/
210 1 12 if ($args{'file_ext_filter'} and ref $args{'file_ext_filter'} eq 'Regexp') { }
1 22 elsif ($args{'file_ext_filter'} and ref $args{'file_ext_filter'} eq 'ARRAY') { }
213 0 3 if -d $name
214 0 3 unless -f _
215 3 0 $name =~ /\.(\w+)\z/ ? :
216 2 1 if $ext =~ /$args{'file_ext_filter'}/
222 0 3 if -d $name
223 0 3 unless -f _
224 3 0 $name =~ /\.(\w+)\z/ ? :
225 0 3 if ($Complete::Common::OPT_CI) { }
228 0 0 if $ext eq lc $e
232 2 3 if $ext eq $e
241 1 12 if ($args{'_dir'})
242 7 3 unless -d $_[0]
247 1 12 if ($args{'exclude_dir'})
248 2 1 if -d $_[0]
254 7 3 unless &$filter_dir($name)
10 60 if ($filter_dir)
255 2 1 unless &$filter_xdir($name)
3 60 if ($filter_xdir)
256 13 4 unless &$filter($name)
17 44 if ($filter)
257 5 6 unless &$filter_fregex($name)
11 37 if ($filter_fregex)
258 2 4 unless &$filter_fext($name)
6 37 if ($filter_fext)