Branch Coverage

blib/lib/App/Greple/Grep.pm
Criterion Covered Total %
branch 107 148 72.3


line true false branch
51 12 197 if $obj->is_required
52 6 191 if $obj->is_negative
107 145 16 if $max < 2
109 0 16 if length $_ < $threshold
111 2 14 if @eligible < 2
113 0 14 if $App::Greple::Grep::debug{'m'}
119 0 30 unless pipe my $r, my $w
121 0 30 unless (defined $pid)
125 0 30 if ($pid == 0)
133 0 0 if length $data
146 0 30 if $? != 0
150 27 0 $v[$j + 2] == 18446744073709551615 ? :
166 0 14 if $self->{'BORDERS_CHILD'}
167 0 14 if @{$self->{'block'}}
169 0 14 if length $_ < $threshold
170 0 14 unless pipe my $r, my $w
172 0 14 unless (defined $pid)
176 0 14 if ($pid == 0)
180 0 0 if length $data
187 0 14 if $App::Greple::Grep::debug{'m'}
196 0 13 if $? != 0
202 1 160 if (my $child = delete $self->{'BORDERS_CHILD'})
231 0 224 if ($pat->is_function) { }
243 30 194 $parallel[$i] ? :
244 16 208 if (@p == 0) { }
249 0 16 if $pat->is_required and $self->{'need'} >= 0
253 1 15 if ($self->{'group_index'} == 2 and not $pat->is_function)
256 0 1 unless $#+
261 202 6 if ($pat->is_positive) { }
266 14 188 if $self->{'parallel'} and not @blocks
278 4 204 if ($self->{'group_index'} == 2)
281 6 0 if (defined $_->index)
283 6 0 if $_->index >= $max_index
289 3 205 if (my $n = @{$self->{'callback'}})
290 3 0 if (my $callback = $self->{'callback'}[$i % $n])
302 9 152 if $positive_count < $self->{'need'} + $self->{'must'}
307 9 143 if (my(@reg_union) = $self->{'regions'}->union)
311 8 1 if $reg->is_inside
315 7 4 if ($self->{'region_index'} // @result == 1)
329 1 1 unless $reg->is_outside
340 7 145 if (@{$self->{'block'}}) { }
140 5 elsif (@blocks) { }
375 377 993 if (@$b) { }
384 0 152 if $App::Greple::Grep::debug{'g'}
399 0 161 $self->{'need'} < 0 ? :
404 32 129 unless my(@effective_index) = grep(($mp->[$_][7] <= $compromize && $mp->[$_][0] >= $self->{'need'} && $mp->[$_][3] <= $self->{'allow'}), keys @$bp)
410 8 121 if (my $countcheck = $self->{'countcheck'})
411 0 8 unless @effective_index = do { grep {&$countcheck(int @{$mp->[$_][2]});} @effective_index }
421 3 4 if (@{$self->{'block'}} and $self->{'after'} || $self->{'before'})
424 8 1 if $_ >= 0
439 1 252 if ($self->{'stretch'})
445 29 224 if ($self->{'only'}) { }
6 218 elsif ($self->{'all'}) { }
448 6 0 if @list == 0
465 1 128 if ($self->{'join_blocks'} and @list > 1)
467 1 0 if ($App::Greple::Grep::a->[-1][0]->max == $App::Greple::Grep::b->[0]->min) { }
490 0 140 if ($self->{'alert_size'} and length $_ >= $self->{'alert_size'})
499 0 0 if $App::Greple::Grep::debug{'a'}
502 13 127 if ($self->{'BORDERS_CHILD'}) { }
504 13 0 @b ? :
509 0 140 if (defined $alarm_start)
510 0 0 if ($SIG{'ALRM'}) { }
512 0 0 if $App::Greple::Grep::debug{'a'}
553 83 44 if @blocks < 2
556 0 180 if $_->[0] < $pos
567 180 83 @_ ? :
587 3 513 if $s < $offset
609 0 18 if (callable($pattern)) { }
620 6 134 if $opt->{'A'} or $opt->{'B'}
623 203 367 if ($from <= $_[1] and $_[2] < $to)
637 266 109 if $border->[$bi] != $from
638 6 369 if $opt->{'B'}
641 56 319 if $ei == $bi and $ei < $#{$border;}
642 7 368 if $opt->{'A'}