Branch Coverage

blib/lib/Dpkg/Checksums.pm
Criterion Covered Total %
branch 25 44 56.8


line true false branch
109 0 15 unless &checksums_is_supported($alg)
170 3 0 exists $opts{'key'} ? :
172 0 3 if (exists $opts{'checksums'}) { }
178 3 0 unless exists $self->{'size'}{$key}
179 0 3 unless my(@s) = stat $file
180 0 3 if (not $opts{'update'} and exists $self->{'size'}{$key} and $self->{'size'}{$key} != $s[7])
189 0 9 unless open my $fh, '<', $file
194 0 9 if (not $opts{'update'} and exists $self->{'checksums'}{$key}{$alg} and $self->{'checksums'}{$key}{$alg} ne $newsum)
225 6 12 if $checksum eq ''
226 0 12 unless ($checksum =~ /^($regex)\s+(\d+)\s+($rx_fname)$/)
231 0 12 if (not $opts{'update'} and exists $checksums->{$file}{$alg} and $checksums->{$file}{$alg} ne $sum)
236 0 12 if (not $opts{'update'} and exists $self->{'size'}{$file} and $self->{'size'}{$file} != $size)
241 1 11 unless exists $self->{'size'}{$file}
264 0 3 if $opts{'use_files_for_md5'} and $alg eq 'md5'
265 3 0 if (exists $control->{$key})
302 0 1 unless $self->has_file($file)
322 27 9 if defined $alg
323 36 0 if (exists $self->{'checksums'}{$file})
324 9 27 unless defined $alg
351 0 0 if defined $self->get_checksum($file, $alg) and &checksums_get_property($alg, 'strong')
372 0 27 unless defined $sum and defined $size
390 0 3 if $opts{'use_files_for_md5'} and $alg eq 'md5'