Branch Coverage

blib/lib/Test/Chunks.pm
Criterion Covered Total %
branch 126 154 81.8


line true false branch
62 4 69 grep(/^-base$/i, @_) ? :
65 67 6 if (not defined $default_class) { }
69 1 5 unless $default_class->isa($class)
73 13 59 if (@_ > 1 and not grep(/^-base$/i, @_))
89 615 1 if $class->can('new')
91 1 0 if $class->can('new')
96 3 26 if ($$self{'chunk_list'})
104 52 312 ref $_[0] eq $default_class ? :
113 1 89 if @_ > 1
115 0 89 if @_ and not $_[0] =~ /^[a-zA-Z]\w*$/
122 2 74 $section_name ? :
125 40 36 unless wantarray
127 1 35 if $self->_filters_delay
130 44 22 unless $chunk->is_filtered
140 9 17 if (@$list == 0)
145 19 7 if (defined $chunk and not $chunk->is_filtered)
153 0 1 defined $_[0] ? :
183 5 15 if (ref $_[0] eq 'HASH') { }
205 152 3 if ($ENV{'TEST_SHOW_NO_DIFFS'} or $actual eq $expected or not $self->have_text_diff or not $expected =~ /\n./s) { }
213 0 3 unless defined $name
223 24 1 unless $chunk->is_filtered
233 8 31 unless exists $$chunk{$x} and exists $$chunk{$y}
234 18 13 unless $chunk->is_filtered
235 23 8 $chunk->name ? :
245 0 2 unless exists $$chunk{$x} and exists $$chunk{$y}
246 2 0 unless $chunk->is_filtered
247 1 0 $chunk->name ? :
257 1 9 unless exists $$chunk{$x} and defined $y
258 4 5 unless $chunk->is_filtered
259 4 5 ref $y ? :
260 4 5 $chunk->name ? :
270 0 1 unless exists $$chunk{$x} and defined $y
271 1 0 unless $chunk->is_filtered
272 0 1 ref $y ? :
273 1 0 $chunk->name ? :
281 73 1 unless $spec =~ s/\A\s*<<<(.*?)>>>\s*$//ms
285 0 1 if $@
308 2 121 if (exists $$chunk{'ONLY'})
311 2 119 if exists $$chunk{'SKIP'}
313 1 118 if (exists $$chunk{'LAST'})
322 13 195 if $$reserved_section_names{$id} or $id =~ /^_/
332 0 136 unless $hunk =~ s/\A\Q$cd\E[ \t]*(.*)\s+//
337 133 3 unless ($description =~ /\S/)
348 3 192 unless defined $value
362 19 55 if $self->_spec_string
366 3 52 if (my $spec_file = $self->_spec_file) { }
367 0 3 unless open FILE, $spec_file
387 15 71 if $done
390 0 1107 if $status < 0
391 56 1051 if (/^__(?:END|DATA)__\r?$/)
406 0 4 unless @_
434 0 364 if defined &$accessor
437 0 700 if (@_)
440 0 700 unless $$self{$accessor}
442 195 505 wantarray ? :
457 229 993 unless defined &$accessor
465 0 114 if $self->is_filtered
472 12 514 $filter =~ s/=(.*)$// ? :
476 36 490 if (defined &$function) { }
479 16 20 if (not @value or @value == 1 and $value[0] =~ /\A(\d+|)\z/)
487 1 489 unless $filter_object->can($filter)
506 5 175 unless ref $map_filters
514 0 551 unless length $filter
515 2 549 if ($filter =~ s/^-//) { }
2 547 elsif ($filter =~ s/^\+//) { }
547 7 10 unless defined $arguments
554 223 0 if @_ == 1
616 0 12 if $@
656 0 3 unless open my $execution, "$^X $tmpfile 2>&1 |"
661 0 3 unless unlink $tmpfile
668 0 3 unless open my $script, ">$filename"
671 0 3 unless close $script
684 1 16 unless length $text
695 5 2 unless defined $string
720 4 2 if ($text =~ /\n.*?\n/s) { }
721 1 3 unless defined $flags
729 0 6 if $@