Coverage Summary

# Branch Coverage

bin/unburden-home-dir
Criterion | Covered | Total | %
--- | --- | --- | ---
branch | 131 | 152 | 89.4

line | true | false | branch
--- | --- | --- | ---
120 | 1 | 151 | if ($key eq 'h') { }
| 2 | 149 | elsif ($key eq 'b') { }
138 | 34 | 117 | if ($key eq 'C') { }
| 34 | 83 | elsif ($key eq 'c') { }
| 34 | 49 | elsif ($key eq 'L') { }
| 34 | 15 | elsif ($key eq 'l') { }
| 6 | 9 | elsif ($key eq 'n') { }
| 2 | 7 | elsif ($key eq 'u') { }
| 3 | 4 | elsif ($key eq 'F') { }
| 2 | 2 | elsif ($key eq 'f') { }
147 | 1 | 1 | if ($@)
156 | 54 | 4 | if (-e $configfile)
159 | 35 | 19 | if (defined $cf)
186 | 28 | 27 | unless $output =~ /^sent |^total size|^\s*$/
197 | 1 | 34 | unless ($which_lsof)
218 | 11 | 2 | unless ($DRYRUN)
219 | 9 | 2 | if (-d $from) { }
220 | 9 | 0 | unless $from =~ m[/$]
221 | 9 | 0 | unless $to =~ m[/$]
242 | 3 | 2 | unless ($DRYRUN)
244 | 0 | 3 | unless symlink $old, $new
255 | 8 | 12 | unless (-d $parent_dir)
257 | 5 | 3 | unless $DRYRUN
271 | 2 | 3 | if ($type eq 'D') { }
| 3 | 0 | elsif ($type eq 'F') { }
275 | 1 | 1 | unless $DRYRUN
283 | 2 | 1 | unless $DRYRUN
299 | 3 | 1 | if ($is_dir)
306 | 1 | 3 | if ($link ne $target)
312 | 2 | 1 | if (-e $target) { }
314 | 2 | 0 | 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 | 17 | if ($is_file and not -f $itemexpanded)
467 | 2 | 15 | 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') { }
536 | 36 | 0 | if ($path =~ s[$ENV{'HOME'}/?][]) { }
545 | 8 | 34 | if -l $path_to_check
561 | 0 | 36 | if ($itemexpanded =~ /[][*?]/)
566 | 8 | 28 | if (my $symlink = symlink_in_path($itemexpanded))
575 | 5 | 23 | if (not -e $itemexpanded || -l $itemexpanded) { }
| 4 | 19 | elsif (-l $itemexpanded) { }
599 | 0 | 2 | if ($itemexpanded =~ /[][*?]/)
608 | 2 | 0 | if (-l $item_in_home)
613 | 2 | 0 | if ($itemexpanded eq $link_target) { }
615 | 1 | 1 | unless $DRYRUN
642 | 4 | 56 | unless -r $list
646 | 0 | 56 | unless open $list_fh, '<', $list
648 | 3 | 47 | if /^#|^ *$/
653 | 1 | 46 | unless defined $action
655 | 2 | 43 | unless (defined $item and defined $replacement and $replacement ne '')
661 | 1 | 42 | unless (type_is_directory($type) or type_is_file($type))
665 | 1 | 39 | if ($action ne 'd' and $action ne 'r' and $action ne 'm')
670 | 2 | 39 | if ($item =~ m[^(\.\.)?/])
675 | 2 | 37 | if ($REVERT) { }
680 | 0 | 2 | if (defined $FILTER)
681 | 0 | 0 | unless $i =~ /$FILTER/
687 | 2 | 35 | if (defined $FILTER)
688 | 1 | 1 | unless $i =~ /$FILTER/