Branch Coverage

lib/Git/Hooks/Test.pm
Criterion Covered Total %
branch 23 50 46.0


line true false branch
81 0 32 unless open my $fh, ">", $hook_pl
82 0 13 $ENV{'DBG'} ? :
91 0 13 $^O eq 'MSWin32' ? :
92 32 0 if (defined $ENV{'PERL5LIB'} and length $ENV{'PERL5LIB'})
94 64 0 if $path
102 11 21 if defined $extra_perl
112 0 32 if ($^O eq 'MSWin32') { }
125 1 31 unless @hooks
134 0 77 if ($^O eq 'MSWin32') { }
137 0 0 $ENV{'DBG'} ? :
142 0 0 unless path($hookfile)->spew($script)
147 0 77 unless symlink "hook.pl", $hookfile
163 0 22 unless mkdir $repodir, 511
165 0 22 unless open my $fh, ">", $filename
189 0 22 unless open my $err_h, ">", $T->child("stderr")
197 0 22 unless $cmd->exit == 0
207 0 22 if (my $E = $@)
209 0 0 if (-s $stderr)
210 0 0 unless open my $err_h, "<", $stderr
260 103 0 if ($ok) { }
272 3 0 if ($ok) { }
273 3 0 if ($stdout =~ /$regex/u or $stderr =~ /$regex/u) { }
289 0 7 if ($ok) { }
301 0 78 if ($ok) { }
78 0 elsif ($stdout =~ /$regex/u or $stderr =~ /$regex/u) { }