Branch Coverage

blib/lib/App/ansifold.pm
Criterion Covered Total %
branch 50 74 67.5


line true false branch
118 163 0 unless utf8::is_utf8($_)
124 5 48 unless $app->getopt
127 7 41 if ($app->colrm) { }
6 35 elsif ($app->cut) { }
141 0 48 if ($app->expand > 0)
147 96 0 unless defined $_ and length $_ > 1
151 0 48 if (my $indent = $app->autoindent)
166 18 82 if (/^$/u) { }
82 0 elsif (/^-?\d+$/u) { }
0 0 elsif (/^(-?[-\d:]+) (?:\{(\d+)\})? $/ux) { }
0 0 elsif (/^(term|tty)$/u) { }
181 7 41 if (@width == 0) { }
9 32 elsif (@width == 1) { }
185 12 47 $_ < 0 ? :
213 0 48 if $app->refill
215 0 44 if (s/\A(\n+)//u)
217 0 0 if length $_ == 0
220 14 30 s/(\n+)\z//u ? :
221 0 44 if $app->refill
223 0 44 if ($app->{'indent_pat'} and /^$app->{'indent_pat'}/pu)
229 32 12 if @index > 0
231 14 30 if $chomped
232 0 44 if $app->paragraph > 0
247 0 0 if (open my $tty, ">", "/dev/tty")
253 0 0 unless $size[0]
260 0 8 unless $pos < $start
262 5 3 defined $end ? :
267 4 3 if @width == 0 or $width[-1] ne ""
277 0 11 if $col eq ""
279 6 5 if ($col =~ /^(\d+)$/u) { }
1 4 elsif ($col =~ /^-(\d+)/u) { }
1 3 elsif ($col =~ /^(\d+)-$/u) { }
3 0 elsif ($col =~ /^(\d+)-(\d+)$/u) { }
283 0 11 unless $pos <= $start
284 7 4 if ($start > $pos)
287 1 10 if ($end < 0) { }
295 5 1 if $width[-1] != -1