Condition Coverage

blib/lib/Sys/Export/VFAT.pm
Criterion Covered Total %
condition 99 190 52.1


and 3 conditions

line !l l&&!r l&&r condition
106 0 0 3 &isa_pow2($val[0]) and $val[0] <= 128
118 0 0 0 &isa_int($val[0]) and $val[0] > 0
185 0 10517 0 defined $leaf && $leaf =~ /^\./u
193 0 8943 1573 defined $data_ref and not ref $data_ref
205 10479 37 0 defined $align and not &isa_pow2($align)
211 0 0 1 $offset > $self->volume_offset + _minimum_offset_to_data() and not $offset & $align - 1
227 1 0 0 $cur and $cur->{'file'}
363 0 0 10556 !($name =~ /^(\.+\.?)\z/u) && $name =~ /^ [^\x00-\x20\x22\x2A\x2F\x3A\x3C\x3E\x3F\x5C\x7C\x7F] [^\x00-\x1F\x22\x2A\x2F\x3A\x3C\x3E\x3F\x5C\x7C]{0,254} \z/ux
371 36 10 10556 $name eq uc $name && $name =~ /^ [\x21\x23-\x29\x2D\x30-\x39\x40-\x5A\x5E-\x7B\x7D\x7E\x80-\xFF] [\x20\x21\x23-\x29\x2D\x30-\x39\x40-\x5A\x5E-\x7B\x7D\x7E\x80-\xFF]{0,7} (?: \. ( [\x21\x23-\x29\x2D\x30-\x39\x40-\x5A\x5E-\x7B\x7D-\xFF] [\x20\x21\x23-\x29\x2D\x30-\x39\x40-\x5A\x5E-\x7B\x7D-\xFF]{0,2} )? )? \z/ux
405 0 0 33 $ent->{'dir'} && $ent->{'dir'}->file
406 0 0 10550 $file and not $seen{builtin::refaddr($file)}++
420 0 0 31 &isa_int($root_dirent_used) and $root_dirent_used >= 1
434 31 168 28 $best and $cluster_size > 32768
485 0 255 1 not $root_clusters_added and $clusters > 65509
507 183 14 0 defined $min_ofs and $min_ofs < $geom->data_start_device_offset
512 183 7 7 defined $max_ofs and $max_ofs > $geom->data_limit_device_offset
771 31 3 10615 $file && $file->cluster
781 99 10514 36 defined $name and $name ne $shortname
808 31 10618 0 $file && $file->mtime
809 31 10618 0 $file && $file->atime
810 31 10618 0 $file && $file->btime
814 0 0 10550 $file && $file->flags
819 31 4 10614 $file and $file != $self->root->file

or 2 conditions

line l !l condition
76 190 69 $self->{'volume_offset'} // 0
97 3 28 $self->{'bytes_per_sector'} // 512
129 0 0 $self->{'free_space'} // 0
209 0 1 $align //= 512
259 0 0 $ent->{'shortname'} // ""
312 31 0 $alloc->max_cluster_id // -1
31 0 $geom->max_cluster_id // -1
443 185 14 $clusters ||= 1
686 0 1 $attrs{'BPB_FSInfo'} //= 1
687 0 1 $attrs{'BPB_BkBootSec'} //= 2
718 73703 1334 $fat->[$_] //= 0
763 0 31 $self->volume_label // "NO NAME "
776 1574 8976 $ext // ""
814 10550 0 ($ent->{'flags'} // $file && $file->flags) // 0

or 3 conditions

line l !l&&r !l&&!r condition
157 0 10517 0 defined $spec->{'uname'} or defined $spec->{'name'}
161 0 10517 0 $spec->{'uname'} // &decode("UTF-8", $spec->{'name'}, 9)
183 0 0 10517 $spec->{'FAT_flags'} // do { (!($spec->{'mode'} & 256) ? "ATTR_READONLY" : 0) | (defined $leaf && $leaf =~ /^\./u ? "ATTR_HIDDEN" : 0) }
202 0 10516 0 $size //= length $$data_ref
331 0 0 30 not $rootf->size or $rootf->size & 31
0 0 30 not $rootf->size or $rootf->size & 31 or length ${$rootf->data;} != $rootf->size
0 0 30 not $rootf->size or $rootf->size & 31 or length ${$rootf->data;} != $rootf->size or $rootf->size > $geom->root_dir_size
405 10517 33 0 $ent->{'file'} //= $ent->{'dir'} && $ent->{'dir'}->file
505 14 183 59 @offsets or @aligned
537 31 1 167 not $best or $best->{'geom'}->total_sector_count > $geom->total_sector_count
561 7 0 0 $alloc->alloc_range($cl, $cl_count) // croak("Can't allocate $cl_count clusters from offset " . $file->device_offset)
565 359 0 0 $alloc->alloc_contiguous($cl_count, $mul, $ofs) // croak("Can't allocate $cl_count clusters aligned to " . $file->align)
568 19735 0 0 $alloc->alloc($cl_count) // croak("Can't allocate $cl_count clusters")
585 1 10550 0 $file->{'device_offset'} //= $geom->get_cluster_device_offset($file->{'cluster'})
644 330 370 0 $$attrs{$_->[0]} // $_->[4]
370 0 0 ($$attrs{$_->[0]} // $_->[4]) // croak("No value supplied for $_->[0], and no default")
675 0 0 31 $attrs{'BS_VolLab'} //= $self->volume_label
676 0 31 0 $attrs{'BS_VolID'} //= time & 4294967295
698 0 1 0 $attrs{'FSI_Free_Count'} //= $self->allocation_table->free_cluster_count
699 0 0 1 $attrs{'FSI_Nxt_Free'} //= $self->allocation_table->first_free_cluster
713 31 0 0 $alloc->max_cluster_id // $alloc->max_used_cluster_id
738 1 64 0 $dir->{'file'} //= "Sys::Export::VFAT::File"->new("name", $dir->name, "flags", "ATTR_DIRECTORY")
771 10550 99 0 $shortname // $short11
808 0 0 10649 $ent->{'mtime'} // $file && $file->mtime
0 10649 0 ($ent->{'mtime'} // $file && $file->mtime) // time
809 0 0 10649 $ent->{'atime'} // $file && $file->atime
0 10649 0 ($ent->{'atime'} // $file && $file->atime) // $mtime
810 0 0 10649 $ent->{'btime'} // $file && $file->btime
0 10649 0 ($ent->{'btime'} // $file && $file->btime) // $mtime
814 99 10550 0 $ent->{'flags'} // $file && $file->flags
820 10614 0 0 $file->cluster // croak('File ' . $file->name . ' lacks a defined cluster id')