Branch Coverage

bin/unburden-home-dir
Criterion Covered Total %
branch 133 146 95.9


line true false branch
120 1 170 if ($key eq 'h') { }
2 168 elsif ($key eq 'b') { }
138 38 132 if ($key eq 'C') { }
38 94 elsif ($key eq 'c') { }
38 56 elsif ($key eq 'L') { }
38 18 elsif ($key eq 'l') { }
6 12 elsif ($key eq 'n') { }
4 8 elsif ($key eq 'u') { }
3 5 elsif ($key eq 'F') { }
3 2 elsif ($key eq 'f') { }
147 1 2 if ($@)
156 39 4 if (-e $configfile)
159 39 0 if (defined $cf)
186 28 27 unless $output =~ /^sent |^total size|^\s*$/
197 1 38 unless ($which_lsof)
218 12 2 unless ($DRYRUN)
219 9 3 if (-d $from) { }
242 4 2 unless ($DRYRUN)
244 0 4 unless symlink $old, $new
255 8 14 unless (-d $parent_dir)
257 5 3 unless $DRYRUN
271 2 4 if ($type eq 'D') { }
4 0 elsif ($type eq 'F') { }
275 1 1 unless $DRYRUN
283 3 1 unless $DRYRUN
299 3 2 if ($is_dir)
306 1 4 if ($link ne $target)
312 3 1 if (-e $target) { }
314 2 1 if $unexpected_type
334 1 1 if ($line =~ /^p(.*)$/) { }
1 0 elsif ($line =~ /^c(.*)$/) { }
340 0 1 unless ($pid)
362 11 4 if (-d $item) { }
3 1 elsif (-f _) { }
373 1 13 if ($lsof_parsed) { }
387 0 11 unless move($itemexpanded, $target)
400 2 2 unless ($DRYRUN)
401 1 1 if $is_dir
403 1 1 if $is_file
416 3 2 unless ($DRYRUN)
417 2 1 if (type_is_directory($type)) { }
1 0 elsif (type_is_file($type)) { }
424 0 1 unless touch($target)
436 12 3 unless ($DRYRUN)
438 0 12 unless symlink $target, $itemexpanded
461 3 18 if ($is_file and not -f $itemexpanded)
467 2 16 if ($is_dir and not -d $itemexpanded)
480 1 18 if ($USE_LSOF and files_in_use($itemexpanded))
485 3 15 if $unexpected_type
487 4 11 if ($action eq 'r' or $action eq 'd') { }
11 0 elsif ($action eq 'm') { }
534 38 0 if ($path =~ s[$ENV{'HOME'}/?][]) { }
543 8 36 if -l $path_to_check
557 8 30 if (my $symlink = symlink_in_path($itemexpanded))
566 6 24 if (not -e $itemexpanded || -l $itemexpanded) { }
5 19 elsif (-l $itemexpanded) { }
593 4 0 if (-l $item_in_home)
598 3 1 if ($itemexpanded eq $link_target) { }
600 2 1 unless $DRYRUN
627 4 39 unless -e $list
628 1 38 unless (-r _)
636 0 38 unless open $list_fh, '<', $list
638 3 52 if /^#|^ *$/
643 1 51 unless defined $action
645 3 48 unless (defined $item and defined $replacement and $replacement ne '')
651 1 47 unless (type_is_directory($type) or type_is_file($type))
655 1 46 if ($action ne 'd' and $action ne 'r' and $action ne 'm')
660 2 44 if ($item =~ m[^(\.\.)?/])
665 5 39 if ($REVERT) { }
670 2 3 if (defined $FILTER)
671 1 1 unless $i =~ /$FILTER/
677 2 37 if (defined $FILTER)
678 1 1 unless $i =~ /$FILTER/