Branch Coverage

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


line true false branch
50 3 10 if (defined $_[0] and $_[0] =~ /^(?:no_plan|skip_all|tests)$/)
55 1 2 if ($_[0] eq 'tests') { }
1 1 elsif ($_[0] eq 'skip_all') { }
77 5 21 unless $perl
83 0 26 unless (defined $path)
86 0 26 if ('File::Spec::Unix'->file_name_is_absolute($path))
108 4 4 $? ? :
109 4 4 $? ? :
116 4 4 unless $ok
117 0 8 if $error
118 1 7 if $signal
131 26 0 if (-w 'File::Spec'->curdir) { }
140 0 26 unless open $fh, '>', $filename
147 0 26 unless print $fh 'unshift @INC, ', join(',', map({'"' . quotemeta($_) . '"';} grep({not ref $_;} @INC)))
149 0 26 unless close $fh
168 12 6 unless $_[0]
177 2 1 unless defined $testname
179 1 2 unless eval { do { defined $opt->{'exit'} } }
189 4 32 if ($opt->{'stdin'})
193 2 2 if (ref $opt->{'stdin'} eq 'SCALAR') { }
2 0 elsif (ref $opt->{'stdin'} eq '') { }
200 0 2 unless open $tmp, '>', $filename
214 0 4 unless open $fh, '<', $filename
215 0 4 unless 'STDIN'->fdopen($fh, 'r')
221 18 18 $? ? :
222 18 18 $? ? :
227 12 24 unless $ok
228 0 36 if $error
229 2 34 unless $signal == $opt->{'signal'}
239 20 16 $regex ? :
240 16 20 if $not
244 16 20 unless ($ok)
247 8 8 $not ? :
248 8 8 if ($regex) { }
336 11 7 unless $_[0]
345 4 2 unless defined $testname
347 1 5 unless eval { do { defined $opt->{'exit'} } }
424 26 29 if (defined &_STRING($in))
427 29 0 if (&_ARRAY($in))
428 29 0 unless (scalar grep({not defined &_STRING($_);} @$in))
441 24 2 if (open $fh, '<', $script)
446 2 24 grep(/^-.*T/, split(/\s+/, $first_line, 0)) ? :
455 20 17 ref $_[0][0] eq 'HASH' ? :
457 28 9 unless defined $options{'exit'}
458 35 2 unless defined $options{'signal'}
461 35 2 unless defined $options{'stdout'}
462 35 2 unless defined $options{'stderr'}
464 3 34 if (defined $options{'interpreter_options'}) { }
466 1 2 unless $permit_interpreter_options
467 1 1 unless (ref $options{'interpreter_options'} eq 'ARRAY')
482 29 0 ref $_[0] eq 'ARRAY' && @{$_[0];} ? :
486 92 29 defined $_[0] && !ref($_[0]) && length $_[0] ? :