Branch Coverage: bin/unburden-home-dir

# Branch Coverage

File: | bin/unburden-home-dir
Coverage: | 53.0%

line | % | coverage | branch
--- | --- | --- | ---
145 | 0 | T | F | if ($@)
154 | 100 | T | F | if (-e $configfile)
181 | 100 | T | F | unless /^sent |^total size|^\s*$/
188 | 50 | T | F | unless ($which_lsof)
209 | 100 | T | F | unless ($DRYRUN)
210 | 100 | T | F | if (-d $from) { }
211 | 50 | T | F | unless $from =~ m[/$]
212 | 50 | T | F | unless $to =~ m[/$]
233 | 50 | T | F | unless ($DRYRUN)
234 | 50 | T | F | unless symlink $old, $new
245 | 100 | T | F | unless (-d $parent_dir)
247 | 100 | T | F | unless $DRYRUN
261 | 50 | T | F | if ($type eq 'D') { }
| 0 | T | F | elsif ($type eq 'F') { }
265 | 50 | T | F | unless $DRYRUN
273 | 0 | T | F | unless $DRYRUN
289 | 50 | T | F | if ($is_dir)
296 | 50 | T | F | if ($link ne $target)
302 | 50 | T | F | if (-e $target) { }
304 | 0 | T | F | if $unexpected_type
324 | 0 | T | F | if ($line =~ /^p(.*)$/) { }
| 0 | T | F | elsif ($line =~ /^c(.*)$/) { }
329 | 0 | T | F | unless ($pid)
349 | 100 | T | F | if (-d $item) { }
| 50 | T | F | elsif (-f _) { }
360 | 50 | T | F | if ($lsof_parsed) { }
373 | 50 | T | F | unless move $itemexpanded, $target
386 | 0 | T | F | unless ($DRYRUN)
387 | 0 | T | F | if $is_dir
388 | 0 | T | F | if $is_file
401 | 50 | T | F | unless ($DRYRUN)
402 | 50 | T | F | if (type_is_directory($type)) { }
| 0 | T | F | elsif (type_is_file($type)) { }
408 | 0 | T | F | unless touch($target)
428 | 100 | T | F | unless ($DRYRUN)
429 | 50 | T | F | unless symlink $target, $itemexpanded
452 | 50 | T | F | unless ($is_file or $is_dir)
456 | 50 | T | F | if ($is_file and not -f $itemexpanded)
462 | 50 | T | F | if ($is_dir and not -d $itemexpanded)
475 | 50 | T | F | if ($USE_LSOF and files_in_use($itemexpanded))
480 | 50 | T | F | if $unexpected_type
482 | 50 | T | F | if ($action eq 'r' or $action eq 'd') { }
| 50 | T | F | elsif ($action eq 'm') { }
531 | 50 | T | F | if ($path =~ s[$ENV{'HOME'}/?][]) { }
540 | 100 | T | F | if -l $path_to_check
556 | 50 | T | F | if ($itemexpanded =~ /[][*?]/)
561 | 100 | T | F | if (my $symlink = symlink_in_path($itemexpanded))
570 | 100 | T | F | if (not -e $itemexpanded || -l $itemexpanded) { }
| 100 | T | F | elsif (-l $itemexpanded) { }
594 | 50 | T | F | if ($itemexpanded =~ /[][*?]/)
603 | 50 | T | F | if (-l $item_in_home)
608 | 50 | T | F | if ($itemexpanded eq $link_target) { }
610 | 100 | T | F | unless $DRYRUN
637 | 100 | T | F | unless -r $list
640 | 50 | T | F | unless open LIST, '<', $list
642 | 100 | T | F | if /^#|^ *$/
647 | 100 | T | F | unless defined $action
649 | 50 | T | F | unless (defined $item and defined $replacement)
653 | 50 | T | F | unless (type_is_directory($type) or type_is_file($type))
657 | 50 | T | F | if ($action ne 'd' and $action ne 'r' and $action ne 'm')
662 | 100 | T | F | if ($item =~ m[^(\.\.)?/])
667 | 100 | T | F | if ($REVERT) { }
672 | 50 | T | F | if (defined $FILTER)
673 | 0 | T | F | unless $i =~ /$FILTER/
679 | 50 | T | F | if (defined $FILTER)
680 | 0 | T | F | unless $i =~ /$FILTER/