Branch Coverage

blib/lib/File/Unsaved.pm
Criterion Covered Total %
branch 17 36 47.2


line true false branch
93 1 5 unless -f $path
101 3 2 unless -l $spath
103 1 1 if ($target =~ /\A(.+)\@(.+)\.(\d+):(\d+)\z/) { }
1 0 elsif ($target =~ /\A(.+)\@(.+)\.(\d+)\z/) { }
106 0 1 if ($check_pid)
107 0 0 unless kill 0, $res->{'pid'}
108 0 0 if ($check_proc_name and eval { do { require Proc::Find; 1 } })
110 0 0 unless Proc::Find::proc_exists('pid', $res->{'pid'}, 'name', qr/\b(emacs)\b/)
118 0 1 if ($check_pid)
119 0 0 unless kill 0, $res->{'pid'}
120 0 0 if ($check_proc_name and eval { do { require Proc::Find; 1 } })
123 0 0 unless $findres
135 1 2 unless -f $spath
136 0 2 if -M $spath > -M $path
137 0 2 unless open my $fh, '<', $spath
138 0 2 unless sysseek $fh, 1007, 0
139 1 1 unless sysread $fh, my $data, 1
140 0 1 unless $data eq 'U'