Branch Coverage

bin/rm
Criterion Covered Total %
branch 46 74 62.1


line true false branch
86 1 9 if $self->is_overwrite
88 0 10 unless (() = $self->files)
89 0 0 if $self->is_force
95 2 8 $errors ? :
119 11 3 unless $self->{'options'}{'R'}
132 9 23 if (exists $args{'--'})
137 0 64 if (/\A\-\-/)
145 35 29 if (/\A\-(.+)/) { }
157 6 3 if (exists $args{'-f'} and exists $args{'-i'})
160 0 6 unless /\A-[fi]\z/
167 6 6 if ($last eq '-f' and $_ eq '-i' or $last ne '-f' and $_ eq '-f') { }
197 0 20 unless $ret
199 142 98 defined $_ ? :
209 4 9 if (-d $filename) { }
210 2 2 unless ($self->is_recursive)
211 1 1 unless $self->is_force
212 1 1 $self->is_force ? :
222 2 9 $self->is_force ? :
229 0 2 unless (opendir $dh, $dirname)
230 0 0 unless $self->is_force
231 0 0 $self->is_force ? :
235 4 2 if $file eq "." or $file eq ".."
238 0 2 -d $path ? :
244 0 2 unless (rmdir $dirname)
245 0 0 unless $self->is_force
246 0 0 $self->is_force ? :
249 0 2 if $self->is_verbose
258 0 11 if ($self->is_interactive) { }
0 13 elsif (not $self->is_force and -e $filename and not -w $filename) { }
260 0 0 if readline(STDIN) =~ /^[Nn]/
264 0 0 if readline(STDIN) =~ /^[Nn]/
267 4 7 unless (unlink $filename)
268 2 2 unless $self->is_force
269 2 2 $self->is_force ? :
272 0 7 if $self->is_verbose
288 0 4 unless $self->error_fh
294 0 0 unless $self->output_fh