Branch Coverage

blib/lib/Test2/IPC/Driver/Files.pm
Criterion Covered Total %
branch 75 92 81.5


line true false branch
34 0 73 unless $tmpdir
39 1 72 if $ENV{'T2_KEEP_TEMPDIR'}
63 1 35 unless my $type = &blessed($e)
65 1 34 unless $type->isa('Test2::Event')
80 1 85 if -e $hfile
83 0 85 unless open my $fh, '>', $hfile
95 1 55 unless -e $hfile
98 0 55 unless open my $fh, '<', $hfile
102 0 55 unless $pid == $$
105 0 55 unless 0 == $tid
108 1 54 if ($ENV{'T2_KEEP_TEMPDIR'}) { }
109 0 1 unless rename $hfile, 'File::Spec'->canonpath("$hfile.complete")
112 0 54 unless unlink $hfile
115 0 55 unless opendir my $dh, $tdir
117 2 171 if $file =~ /\.complete$/
118 170 1 unless $file =~ /^$hid/
130 19 19 $global ? :
132 2 36 unless $global or -f $hfile
148 19 15 if ($global)
156 0 33 unless rename $file, $ready
159 1 33 unless ($ok)
193 0 70 unless opendir my $dh, $tempdir
197 140 159 if substr($file, 0, 1) eq '.'
199 121 38 unless substr($file, -6, 6) eq '.ready'
205 0 38 unless $have_hid or $global
207 11 27 if $global and $self->{'globals'}{$hid}{$file}++
217 14 13 if $global
220 1 12 if ($ENV{'T2_KEEP_TEMPDIR'}) { }
221 0 1 unless rename $full, $complete
224 0 12 unless unlink $full
237 1 30 unless &blessed($obj)
240 2 28 unless ($obj->isa('Test2::Event'))
245 1 1 unless $ok
248 1 0 unless $obj->isa('Test2::Event')
270 1 54 unless defined $self->pid
271 1 53 unless defined $self->tid
273 2 51 unless $$ == $self->pid
274 1 50 unless 0 == $self->tid
278 0 50 unless opendir my $dh, $tempdir
280 98 8 if $file =~ /^\.+$/
281 2 6 if $file =~ /\.complete$/
284 5 1 if ($file =~ /^(GLOBAL|HUB-)/)
287 1 4 if $ENV{'T2_KEEP_TEMPDIR'}
288 0 4 unless unlink $full
296 1 48 if ($ENV{'T2_KEEP_TEMPDIR'})
301 0 48 unless rmdir $tempdir