Branch Coverage

blib/lib/App/ansifold.pm
Criterion Covered Total %
branch 59 90 65.5


line true false branch
169 243 0 unless utf8::is_utf8($_)
175 6 74 unless $app->getopt
178 7 67 if ($app->colrm) { }
6 61 elsif ($app->cut) { }
190 0 74 if ($app->expand > 0)
198 148 0 unless defined $_ and length $_ > 1
202 0 74 if (my $indent = $app->autoindent)
206 4 70 if (defined(my $char = $app->splitwide))
208 0 4 if ($char =~ s/\A(\X)(\X)?//u)
225 26 109 if (/^$/u) { }
109 0 elsif (/^-?\d+$/u) { }
0 0 elsif (/^(-?[-\d:]+) (?:\{(\d+)\})? $/ux) { }
0 0 elsif (/^=(.*)/u) { }
241 8 66 if (@width == 0) { }
26 40 elsif (@width == 1) { }
252 40 34 ref $app->width ? :
276 0 74 if $app->refill
278 0 73 if (not $app->padding and s/\A(\n+)//u)
280 0 0 if length $_ == 0
283 43 30 s/(\R+)\z//u ? :
284 0 73 $chomped =~ /\r/u ? :
285 0 73 if $app->refill
286 18 55 if $app->crmode
287 0 73 if ($app->{'indent_pat'} and /^$app->{'indent_pat'}/pu)
290 0 0 if ($indent >= $app->min_width)
295 0 0 if ($app->keepindent) { }
304 40 33 if (ref $app->width eq "ARRAY")
306 109 0 if not $app->padding or $w < 0
310 40 33 if (@index > 0)
314 43 30 if $chomped
315 0 73 if $app->paragraph > 0
354 0 0 if (open my $tty, ">", "/dev/tty")
360 0 0 unless $size[0]
367 0 8 unless $pos < $start
369 5 3 defined $end ? :
374 4 3 if @width == 0 or $width[-1] ne ""
384 0 11 if $_ eq ""
385 3 0 /^(\d+)-(\d+)$/u ? :
1 3 /^(\d+)-$/u ? :
1 4 /^-(\d+)/u ? :
6 5 /^(\d+)$/u ? :
390 0 11 unless $pos <= $start
391 7 4 if ($start > $pos)
394 1 10 if ($end < 0) { }
402 5 1 if $width[-1] != -1