Branch Coverage

blib/lib/LaTeXML/Util/Pathname.pm
Criterion Covered Total %
branch 5 136 3.6


line true false branch
69 0 0 if (my $dir = $pieces{'dir'})
70 0 0 ref $dir eq 'ARRAY' ? :
75 0 0 if $pathname and $pieces{'name'} and not $pathname =~ /\Q$SEP\E$/
76 0 0 if $pieces{'name'}
77 0 0 if $pieces{'type'}
87 0 0 if ($vol) { }
0 0 elsif ('File::Spec'->file_name_is_absolute($pathname) and not 'File::Spec'->file_name_is_absolute($dir)) { }
90 0 0 unless $dir eq $SEP
92 0 0 if ($name =~ s/\.([^\.]+)$//)
101 0 231 if ($pathname =~ /^($LITERAL_RE)/)
104 0 231 unless defined $pathname
110 0 231 if ($pathname =~ s[^($PROTOCOL_RE//[^/]*)/][/])
113 0 231 if ($pathname =~ m[//+/])
120 0 231 defined $urlprefix ? :
141 0 0 $pathname =~ /^($PROTOCOL_RE|$LITERAL_RE)/ ? :
146 0 0 unless $dir
147 0 0 if not defined $file or $file eq '.'
163 0 0 if ($pathname =~ /^($LITERAL_RE)/) { }
174 0 0 $rel =~ m[^\.\.(?:/|\Q$SEP\E)] ? :
185 0 0 $base && pathname_is_absolute($pathname) && !pathname_is_url($pathname) ? :
192 0 0 $base ? :
0 0 !(pathname_is_absolute($pathname) || pathname_is_url($pathname)) ? :
200 0 0 -f $pathname ? :
203 0 0 if (my $cwd = cwd()) { }
216 0 0 unless $directory
222 0 0 unless (-d $dir)
223 0 0 unless mkdir $dir
233 0 0 if (not -f $destination or pathname_timestamp($source) > pathname_timestamp($destination))
234 0 0 if (my $destdir = pathname_directory($destination))
235 0 0 unless pathname_mkdir($destdir)
242 0 0 unless copy($source, $destination)
274 0 0 unless $pathname
277 0 0 if -f $path
282 0 0 unless $pathname
292 0 0 unless $pathname eq '*'
293 0 0 $pathname eq '*' ? :
294 0 0 if defined $type and $type ne ''
296 0 0 if (pathname_is_absolute($pathname)) { }
300 0 0 if ($options{'paths'})
303 0 0 pathname_is_absolute($p) ? :
305 0 0 unless grep {$pp eq $_;} @dirs
306 0 0 unless @dirs
308 0 0 if (my $subdir = $options{'installation_subdir'})
313 0 0 if ($options{'type'})
315 0 0 if ($options{'types'})
317 0 0 if ($ext eq '') { }
0 0 elsif ($ext eq '*') { }
0 0 elsif ($pathname =~ /\.\Q$ext\E$/i) { }
324 0 0 unless @exts
330 0 0 if ($name eq '*') { }
0 0 elsif ($ext eq '.*') { }
331 0 0 if ($ext eq '.*') { }
332 0 0 unless opendir DIR, $dir
336 0 0 unless opendir DIR, $dir
340 0 0 unless opendir DIR, $dir
353 0 0 unless $kpsewhich
354 0 0 unless $kpse_cache
356 0 0 if (my $result = $LaTeXML::Util::Pathname::kpse_cache->{$file})
361 0 0 if ($kpsewhich and my $result = `"$kpsewhich" $files`)
362 0 0 if ($result =~ /^\s*(.+?)\s*\n/s)
368 0 0 unless $kpsewhich
377 0 0 if -d $path
384 0 0 if (-f "$dir/ls-R")
388 0 0 unless open $LSR, '<', "$dir/ls-R"
391 0 0 unless $_
392 0 0 if (/^%/) { }
0 0 elsif (/^(.*?):$/) { }
0 0 elsif (not $skip) { }