Branch Coverage

tools/plha
Criterion Covered Total %
branch 66 176 37.5


line true false branch
33 14 0 unless $opt_use_locale
44 0 0 unless my $fname = shift()
57 0 1 unless my $fname = shift()
66 0 3 if $fullname eq "."
69 3 0 $has_path ? :
70 0 0 if _is_directory($header) and $name ne "" and not $name =~ m[/$]
71 3 0 $has_path ? :
77 0 5 unless my $fname = shift()
95 202 2 $header->{'encoded_size'} && $header->{'original_size'} ? :
99 0 204 if $header->{'comment'}
108 4 1 $totals->{'encoded_size'} && $totals->{'original_size'} ? :
111 0 1 unless my $fname = shift()
129 3 0 ref($header) =~ /Level(\d)/ ? :
140 3 0 $header->{'encoded_size'} && $header->{'original_size'} ? :
142 0 3 if $header->{'comment'}
151 1 0 $totals->{'encoded_size'} && $totals->{'original_size'} ? :
154 0 0 unless my $fname = shift()
173 0 0 if ($totals->{'count'}) { }
174 0 0 unless ($error)
181 0 0 if ($error) { }
188 0 0 unless my $fname = shift()
190 0 0 if (@_)
199 0 0 if (%target and not $target{$header->pathname})
205 0 0 if (_is_directory($header))
206 0 0 unless -d $header->pathname
213 0 0 if $crc != $header->crc16
220 6 8 $ENV{'PLHASA'} ? :
225 6 8 if ($PROGNAME eq 'plhasa') { }
238 0 8 unless my $cmd = shift @ARGV
239 0 8 unless my $file = shift @ARGV
241 1 7 unless (exists $controller->{$cmd})
250 0 6 unless my $arg = shift @ARGV
254 0 6 unless my($cmd_char) = $arg =~ /^([lvtxep])/i
260 0 0 if ($flags =~ s/^q(\d*)//) { }
0 0 elsif ($flags =~ s/^w=([^\s]+)//) { }
0 0 elsif ($flags =~ s/^f//) { }
0 0 elsif ($flags =~ s/^i//) { }
0 0 elsif ($flags =~ s/^n//) { }
0 0 elsif ($flags =~ s/^v//) { }
261 0 0 length $1 ? :
278 0 6 if (@ARGV and $ARGV[0] =~ /^w=(.+)/)
283 0 6 unless my $file = shift @ARGV
287 0 6 if $cmd eq "e"
289 0 6 if ($cmd eq 'p') { }
0 6 elsif ($cmd eq 'x') { }
2 4 elsif ($cmd eq 'l') { }
4 0 elsif ($cmd eq 'v') { }
0 0 elsif ($cmd eq 't') { }
310 0 0 if (%target and not $target{$header->pathname})
314 0 0 if _is_directory($header)
329 0 0 if $opts->{'ignore_path'}
330 0 0 if (%target and not $target{$pathname})
335 0 0 if $opts->{'extract_dir'}
337 0 0 if (_is_directory($header))
338 0 0 unless -d $pathname or $opts->{'dry_run'}
346 0 0 if $crc != $header->crc16
348 0 0 unless ($opts->{'dry_run'})
349 0 0 if (-e $pathname and not $opts->{'force'})
355 0 0 if $opts->{'verbose'}
383 1 0 if ($msg)
393 13 194 $h->{'timestamp_is_unix'} ? :
400 13 194 $h->{'timestamp_is_unix'} ? :
411 2 18 if (abs time - $epoch < $six_months)
422 12 2 $header->{'timestamp_is_unix'} ? :
432 4 2 if ($mode eq 'lv') { }
454 0 14 if $name eq "."
455 0 0 if _is_directory($header) and $name ne "" and not $name =~ m[/$]
456 12 2 if ($header->{'os'}[0] // "") eq "M"
460 14 0 $header->{'original_size'} ? :
0 14 _is_directory($header) ? :
462 10 4 if ($mode eq 'lv') { }
482 4 2 if ($mode eq 'lv') { }
489 6 0 $totals->{'original_size'} ? :
494 2 4 $totals->{'count'} == 1 ? :
497 4 2 if ($mode eq 'lv') { }
519 12 0 if $name =~ /[a-z]/
526 0 14 if (defined $header->{'unix_perm'})
528 0 0 _is_directory($header) ? :
532 0 0 $bits & 4 ? :
533 0 0 $bits & 2 ? :
534 0 0 $bits & 1 ? :
546 0 0 if _is_directory($header)
559 0 13 unless $fname
566 0 0 unless -d $dir
567 0 0 unless open my $fh, ">:raw", $fname
575 0 14 unless open my $fh, "<:raw", $fname
580 0 14 unless $signature eq "-lh"
586 1 13 if (ord $last_byte != 0)