Coverage Summary

# Branch Coverage

bin/unburden-home-dir
Criterion | Covered | Total | %
--- | --- | --- | ---
branch | 147 | 160 | 96.2

line | true | false | branch
--- | --- | --- | ---
48 | 44 | 44 | if (defined $ENV{'TMPDIR'})
51 | 88 | 0 | if (-r '/proc/mounts')
53 | 44 | 44 | if (defined $ENV{'XDG_RUNTIME_DIR'})
61 | 44 | 2772 | if ($mount[1] eq $runtime_dir)
144 | 2 | 348 | if ($key eq 'h') { }
| 4 | 344 | elsif ($key eq 'b') { }
162 | 77 | 266 | if ($key eq 'C') { }
| 76 | 190 | elsif ($key eq 'c') { }
| 77 | 113 | elsif ($key eq 'L') { }
| 77 | 36 | elsif ($key eq 'l') { }
| 12 | 24 | elsif ($key eq 'n') { }
| 8 | 16 | elsif ($key eq 'u') { }
| 6 | 10 | elsif ($key eq 'F') { }
| 6 | 4 | elsif ($key eq 'f') { }
171 | 2 | 4 | if ($@)
180 | 109 | 8 | if (-e $configfile)
183 | 80 | 29 | if (defined $cf)
213 | 68 | 66 | unless $output =~ /^sent |^total size|^\s*$/
226 | 0 | 80 | if (not $which_lsof and -x '/usr/sbin/lsof')
229 | 2 | 78 | if (not $which_lsof) { }
252 | 30 | 4 | unless ($DRYRUN)
253 | 22 | 8 | if (-d $from) { }
276 | 8 | 4 | unless ($DRYRUN)
278 | 0 | 8 | unless symlink $old, $new
289 | 16 | 34 | unless (-d $parent_dir)
291 | 10 | 6 | unless $DRYRUN
305 | 4 | 8 | if ($type eq 'D') { }
| 8 | 0 | elsif ($type eq 'F') { }
309 | 2 | 2 | unless $DRYRUN
317 | 6 | 2 | unless $DRYRUN
333 | 6 | 4 | if ($is_dir)
340 | 2 | 8 | if ($link ne $target)
346 | 6 | 2 | if (-e $target) { }
348 | 4 | 2 | if $unexpected_type
368 | 2 | 4 | if ($line =~ /^p(.*)$/) { }
| 2 | 2 | elsif ($line =~ /^c(.*)$/) { }
374 | 0 | 2 | unless ($pid)
396 | 26 | 10 | if (-d $item) { }
| 8 | 2 | elsif (-f _) { }
407 | 2 | 32 | if ($lsof_parsed) { }
421 | 0 | 28 | unless move($itemexpanded, $target)
434 | 4 | 4 | unless ($DRYRUN)
435 | 2 | 2 | if $is_dir
437 | 2 | 2 | if $is_file
450 | 6 | 4 | unless ($DRYRUN)
451 | 4 | 2 | if (type_is_directory($type)) { }
| 2 | 0 | elsif (type_is_file($type)) { }
458 | 0 | 2 | unless touch($target)
470 | 30 | 6 | unless ($DRYRUN)
472 | 0 | 30 | unless symlink $target, $itemexpanded
495 | 6 | 42 | if ($is_file and not -f $itemexpanded)
501 | 4 | 38 | if ($is_dir and not -d $itemexpanded)
514 | 2 | 42 | if ($USE_LSOF and files_in_use($itemexpanded))
519 | 6 | 36 | if $unexpected_type
521 | 8 | 28 | if ($action eq 'r' or $action eq 'd') { }
| 28 | 0 | elsif ($action eq 'm') { }
568 | 82 | 0 | if ($path =~ s[$ENV{'HOME'}/?][]) { }
577 | 16 | 78 | if -l $path_to_check
591 | 16 | 66 | if (my $symlink = symlink_in_path($itemexpanded))
600 | 12 | 54 | if (not -e $itemexpanded || -l $itemexpanded) { }
| 10 | 44 | elsif (-l $itemexpanded) { }
627 | 8 | 0 | if (-l $item_in_home)
632 | 6 | 2 | if ($itemexpanded eq $link_target) { }
634 | 4 | 2 | unless $DRYRUN
661 | 8 | 110 | unless -e $list
662 | 2 | 108 | unless (-r _)
670 | 0 | 108 | unless open $list_fh, '<', $list
672 | 6 | 110 | if /^#|^ *$/
677 | 2 | 108 | unless defined $action
680 | 106 | 2 | if defined $item
681 | 104 | 4 | if defined $replacement
683 | 4 | 102 | unless (defined $item and defined $replacement and $replacement ne '')
689 | 2 | 100 | unless (type_is_directory($type) or type_is_file($type))
693 | 2 | 94 | if ($action ne 'd' and $action ne 'r' and $action ne 'm')
698 | 4 | 94 | if ($item =~ m[^(\.\.)?/])
703 | 10 | 84 | if ($REVERT) { }
708 | 4 | 6 | if (defined $FILTER)
709 | 2 | 2 | unless $i =~ /$FILTER/
715 | 4 | 80 | if (defined $FILTER)
716 | 2 | 2 | unless $i =~ /$FILTER/