Branch Coverage

blib/lib/Acme/TextLayout.pm
Criterion Covered Total %
branch 77 92 83.7


line true false branch
127 1 11 if (defined $file) { }
11 0 elsif (defined $text) { }
129 0 1 unless defined $fh
150 1 32 unless length $_ == $$self{'widest'}
163 2 8 if $self->_disjoint
164 2 8 if $self->_disjoint
181 2 286 if $n > 1
193 12 692 if $n > 1
197 16 4 $ok ? :
206 0 257 if $len > $widest
228 64 8351 if $_ =~ /\Q$C\E/
229 0 33 if $C eq ' ' and defined $chars{$C} and $chars{$C} == 1
243 0 0 if ($text =~ /$char/)
256 48 134 if $_ =~ /$char/ and not defined $top
258 80 102 if $_ =~ /$char/
270 94 88 unless (defined $first)
271 48 46 if $n >= 0
273 80 102 if (defined $first and $n >= 0)
274 0 80 if $n < $first
287 94 88 unless (defined $last)
288 48 46 if $n >= 0
290 80 102 if (defined $last and $n >= 0)
291 1 79 if $n > $last
310 0 12 if $i1 == $i2
433 268 1047 if $x{$_} > 1
436 82 142 defined $status ? :
467 3 5 if $r[0] == 0
468 0 5 if defined $$self{'Above'}{$char}
472 40 5 if ($_ ne $char)
475 6 14 if $self->_in_x(\@r, \@other) and $other[0] == $r[0] - 1 || $other[1] == $r[0] - 1
496 0 9 if $r[1] == $self->width
497 0 9 if defined $$self{'Below'}{$char}
501 72 9 if ($_ ne $char)
503 9 29 if $self->_in_x(\@r, \@other) and $other[0] == $r[0] + 1 || $other[1] == $r[0] + 1
523 3 6 if $r[2] == 0
524 0 6 if defined $$self{'Left'}{$char}
528 48 6 if ($_ ne $char)
530 7 41 if $self->_in_y(\@r, \@other) and $other[3] == $r[2] - 1
550 0 8 if $r[2] == $self->width
551 0 8 if defined $$self{'Right'}{$char}
555 64 8 if ($_ ne $char)
557 5 59 if $self->_in_y(\@r, \@other) and $other[2] == $r[3] + 1
593 2 2 unless defined $line
594 1 3 unless $line < $self->height
597 0 3 unless defined $text
602 6 13 unless (defined $Chars{$_})