Branch Coverage

blib/lib/Test/Script.pm
Criterion Covered Total %
branch 89 104 85.5


line true false branch
49 3 10 if (defined $_[0] and $_[0] =~ /^(?:no_plan|skip_all|tests)$/)
54 1 2 if ($_[0] eq 'tests') { }
1 1 elsif ($_[0] eq 'skip_all') { }
76 5 21 unless $perl
82 0 26 unless (defined $path)
85 0 26 if ('File::Spec::Unix'->file_name_is_absolute($path))
107 4 4 $? ? :
108 4 4 $? ? :
115 4 4 unless $ok
116 0 8 if $error
117 1 7 if $signal
130 26 0 if (-w 'File::Spec'->curdir) { }
139 0 26 unless open $fh, '>', $filename
146 0 26 unless print $fh 'unshift @INC, ', join(',', map({'"' . quotemeta($_) . '"';} grep({not ref $_;} @INC)))
148 0 26 unless close $fh
167 12 6 unless $_[0]
176 2 1 unless defined $testname
178 1 2 unless eval { do { defined $opt->{'exit'} } }
188 4 32 if ($opt->{'stdin'})
192 2 2 if (ref $opt->{'stdin'} eq 'SCALAR') { }
2 0 elsif (ref $opt->{'stdin'} eq '') { }
199 0 2 unless open $tmp, '>', $filename
213 0 4 unless open $fh, '<', $filename
214 0 4 unless 'STDIN'->fdopen($fh, 'r')
220 18 18 $? ? :
221 18 18 $? ? :
226 12 24 unless $ok
227 0 36 if $error
228 2 34 unless $signal == $opt->{'signal'}
238 20 16 $regex ? :
239 16 20 if $not
243 16 20 unless ($ok)
246 8 8 $not ? :
247 8 8 if ($regex) { }
335 11 7 unless $_[0]
344 4 2 unless defined $testname
346 1 5 unless eval { do { defined $opt->{'exit'} } }
423 26 29 if (defined &_STRING($in))
426 29 0 if (&_ARRAY($in))
427 29 0 unless (scalar grep({not defined &_STRING($_);} @$in))
440 24 2 if (open $fh, '<', $script)
445 2 24 grep(/^-.*T/, split(/\s+/, $first_line, 0)) ? :
454 20 17 ref $_[0][0] eq 'HASH' ? :
456 28 9 unless defined $options{'exit'}
457 35 2 unless defined $options{'signal'}
460 35 2 unless defined $options{'stdout'}
461 35 2 unless defined $options{'stderr'}
463 3 34 if (defined $options{'interpreter_options'}) { }
465 1 2 unless $permit_interpreter_options
466 1 1 unless (ref $options{'interpreter_options'} eq 'ARRAY')
481 29 0 ref $_[0] eq 'ARRAY' && @{$_[0];} ? :
485 92 29 defined $_[0] && !ref($_[0]) && length $_[0] ? :