Branch Coverage

blib/lib/AppleII/ProDOS.pm
Criterion Covered Total %
branch 84 166 50.6


line true false branch
109 0 0 unless valid_name($name)
159 1 0 unless ref $disk
166 0 1 unless $storageType == 15
205 3 0 if ($newpath)
208 1 2 if $newpath =~ s[^/\Q$$self{'name'}\E/?][]i
214 0 2 if $@ =~ /^LibA2: No such directory/
216 0 2 if $@
232 3 16 unless (ref $self and exists $$self{'_dir_methods'}{$name})
267 0 4 if (@_ == 1) { }
1 3 elsif (@_ == 3) { }
0 3 elsif (@_ < 5) { }
311 0 0 unless $date
364 0 0 if (/\?/) { }
0 0 elsif (/\*/) { }
384 2 22 unless $date
404 0 2 unless $date
408 2 0 $year < 77 ? :
430 0 2 if $_[-1] eq "\000\000\000\000"
433 0 2 if $minute > 59 or $hour > 23 or $year > 99 or $month > 12 or $month < 1 or $day > 31 or $day < 1
535 0 1 unless ($startBlock and $diskSize)
562 0 2 if $count > $$self{'free'}
570 2 11 unless --$count
573 0 2 if $count
592 0 0 if $block < 0 or $block >= $$self{'diskSize'}
607 0 2 unless ref $blocks
611 0 13 if $block < 0 or $block >= $diskSize
614 0 2 $mark ? :
714 0 0 unless valid_name($name)
728 0 0 if ($parent) { }
789 0 2 if $self->find_entry($entry->name)
796 0 5 if $$entries[$i]{'num'} > $i + 1
799 0 2 if ($i + 1 >= 13 * scalar(@{$$self{'blocks'};}))
800 0 0 unless $$self{'type'} == 14
802 0 0 unless @blocks
882 0 10 ref $filename ? :
911 0 0 if $filter eq 'DIR'
912 0 0 if $filter eq '!DIR'
913 0 0 unless $filter
914 0 0 $_->name =~ /$pattern/i && &$filter($_) ? :
939 0 0 unless valid_name($dir)
942 0 0 unless $size
945 0 0 unless my(@blocks) = $$self{'bitmap'}->get_blocks($size)
968 0 0 if ($@)
992 0 2 ref $dir ? :
997 0 2 unless $entry->type == 15
1021 0 2 if ($@)
1036 0 3 unless $block
1048 3 81 if (($type & 14) == 14) { }
9 72 elsif ($type) { }
1056 2 1 if ($type == 14)
1085 0 2 if ($$self{'fixParent'})
1094 0 0 if $$disk{'os_openDirs'}{$parentBlock}
1104 24 2 if ($entry) { }
1106 7 17 if (@entries and $entries[0]{'num'} == $entry) { }
1120 0 2 if ($$self{'type'} == 15) { }
1187 9 0 if ($entry) { }
1276 0 2 unless valid_name($name)
1313 2 8 if ($storage == 1) { }
1321 5 3 if ($storage == 2) { }
3 0 elsif ($storage == 3) { }
1329 6 0 if ($block) { }
1344 9 1 if length $data > $size
1376 1 1 if (@dataBlks > 256) { }
1 0 elsif (@dataBlks > 1) { }
1389 2 0 if ($storage > 1)
1395 257 9 unless (substr($$dataRef, $index, 512) =~ /[^\0]/)
1403 1 1 if (@subindexBlks)
1406 0 2 unless (grep {$_;} splice(@blocks, 0, 256))
1418 0 2 unless my(@blocks) = $bitmap->get_blocks($blksUsed)
1423 2 0 if $storage > 1
1427 11 257 if $_
1430 1 1 if ($storage == 3) { }
1475 1 1 if ($storage == 2) { }
1 0 elsif ($storage == 3) { }
1486 2 0 if ($block) { }
1574 6 8 unless $count
1625 0 150 unless my $type = ref $self
1630 0 150 unless (exists $$self{'_permitted'}{$field})
1632 0 0 if $name =~ /^[A-Z]+$/
1635 2 148 if ($#_)
1638 2 0 if (ref $check eq 'CODE') { }
0 0 elsif ($check) { }
1645 2 0 if $ok