Branch Coverage

blib/lib/App/ansicolumn.pm
Criterion Covered Total %
branch 91 150 60.6


line true false branch
222 0 31 unless $obj->getopt
226 0 31 if $obj->debug
228 8 23 @ARGV ? :
0 31 unless my(@files) = $obj->read_files(@ARGV ? @ARGV : "-")
230 0 31 if ($obj->ignore_empty)
234 11 20 if ($obj->table) { }
2 18 elsif ($obj->parallel) { }
252 2 29 if ($obj->parallel //= @ARGV > 1)
259 11 20 if (defined(my $border = $obj->border))
260 9 2 if ($border ne "")
268 0 31 if ($obj->linestyle eq "wordwrap")
274 15 16 if (defined $obj->page)
275 7 8 if $obj->pane and not $obj->pane_width
283 0 31 if ($obj->up)
292 5 26 if ($obj->document)
297 5 0 if $obj->white_space > 1
298 5 0 if $obj->isolation > 1
309 17 14 if ($obj->border)
332 0 2 if (my $cell = $obj->cell)
336 0 0 if ($span =~ /^[-+]/u) { }
0 0 elsif ($span =~ s/^(<=|[<=])//u) { }
0 0 elsif (not $span =~ /^\d+$/u) { }
338 0 0 if $span < 0
342 0 0 $span ? :
356 0 2 if ($obj->filename)
386 1 17 if @$data == 0
400 0 32 unless open my $fh, $file
402 0 0 if $!
405 1 31 $obj->pages ? :
408 0 33 if $obj->paragraph
410 11 22 if ($obj->table) { }
435 389 84 if $len > $length
436 2 471 if $rest =~ s/^\f//u
457 10 10 if ($obj->widen and not $obj->pane_width) { }
465 0 20 if $span < 1
476 0 21 if (my $cell_width = $obj->span) < 1
479 19 2 if ($obj->linestyle and $obj->linestyle ne "none")
481 0 19 unless my $fold = $obj->foldsub($w)
496 0 17 if $obj->effective_height <= 0
506 1 26 if ($obj->fillrows) { }
524 38 0 unless %$hash
527 0 0 unless defined $s and $s ne ""
529 0 0 if ($s =~ s/@(\d+)$//u)
538 0 0 %result ? :
550 0 0 defined $file ? :
557 0 0 unless $spec
559 0 0 unless defined $fmt and $fmt ne ""
560 0 0 $fmt =~ /%/u ? :
579 0 19 if ($bl or $pbl)
587 0 0 if ($bl)
589 0 0 if (grep {$_;} @g)
601 0 0 if ($pbl)
603 0 0 if (grep {$_;} @g)
629 28 30 unless $bd{$side}
636 0 30 if (@$pane_labels)
647 29 0 ref $_[0] eq 'HASH' ? :
648 2 27 $opt->{'span'} ? :
652 0 29 $has_labels ? :
663 14 244 !$bd{'bottom'} && $i == $max ? :
14 258 !$bd{'top'} && $i == 0 ? :
668 652 0 @$_ ? :
690 1 10 unless @_
692 8 2 if ($obj->separator eq ' ') { }
0 2 elsif ($obj->regex_sep) { }
694 8 0 $obj->ignore_space ? :
702 1 9 if (my $spec = $obj->table_remove)
710 1 9 if ($obj->table_squeeze)
715 1 9 if (my $fmt = $obj->item_format)
722 2 8 if ($obj->table_align)
727 1 1 if ($obj->table_tabs)
732 10 90 if ($fx == $#{$l;}) { }
751 1 54 $align[$_] eq '=' ? :
753 0 55 unless @$line
755 2 443 if ($align[$i] eq "=" and (my $w = ansi_width($line->[$i])) < $max[$i])
760 42 13 if $align[$#fmt] ne "" and not $obj->padding