Branch Coverage

blib/lib/Term/TablePrint.pm
Criterion Covered Total %
branch 1 312 0.3


line true false branch
26 0 1 if ($^O eq "MSWin32")
34 0 0 if @_ > 1
43 0 0 if (defined $opt)
44 0 0 if ref $opt ne "HASH"
47 0 0 if defined $opt->{$key}
124 0 0 if ($self->{'hide_cursor'})
127 0 0 if (exists $self->{'backup_instance_defaults'})
130 0 0 if ($key eq 'plugin' or $key eq 'backup_instance_defaults') { }
0 0 elsif (exists $instance_defaults->{$key}) { }
152 0 0 if (ref $_[0] ne __PACKAGE__)
159 0 0 if @_ < 1 or @_ > 2
160 0 0 if ref $tbl_orig ne "ARRAY"
161 0 0 if (defined $opt)
162 0 0 if ref $opt ne "HASH"
171 0 0 if defined $opt->{$key}
180 0 0 if (print_columns($self->{'decimal_separator'}) != 1)
183 0 0 if ($self->{'decimal_separator'} ne ".")
186 0 0 if ($self->{'hide_cursor'})
191 0 0 unless (@$tbl_orig and @{$tbl_orig->[0];})
193 0 0 if (not @$tbl_orig) { }
208 0 0 if ($self->{'max_rows'} and $self->{'_last_index'} > $self->{'max_rows'})
211 0 0 if $self->{'pad_row_edges'}
217 0 0 $self->{'pad_row_edges'} ? :
219 0 0 unless (defined $tbl_print)
226 0 0 if (not defined $next) { }
0 0 elsif ($next == $last_write_table) { }
0 0 elsif ($next == $window_width_changed or $next == $choose_and_print) { }
0 0 elsif ($next == $enter_search_string) { }
0 0 elsif ($next == $from_filtered_table) { }
234 0 0 unless (defined $tbl_print)
261 0 0 if (defined $next and $next == $window_width_changed) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
267 0 0 unless (defined $cols)
274 0 0 $self->{'choose_columns'} ? :
279 0 0 if ($width->{'tab'} < 1)
280 0 0 if ($self->{'choose_columns'}) { }
281 0 0 unless ($desired_cols)
285 0 0 unless ($self->{'tab_width'} % 2)
294 0 0 unless (defined $new_cols)
315 0 0 unless ($desired_cols)
326 0 0 unless ($self->{'tab_width'} % 2)
330 0 0 unless (defined $desired_cols)
346 0 0 if (length $self->{'prompt'})
349 0 0 if (length $self->{'info'} or length $self->{'prompt'})
355 0 0 if ($self->{'_info_row'})
356 0 0 if (print_columns($self->{'_info_row'}) > $width->{'table'}) { }
371 0 0 if ($self->{'_search_regex'}) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
382 0 0 if ($self->{'footer'})
384 0 0 if ($self->{'_search_regex'})
388 0 0 exists $ENV{'TC_POS_AT_SEARCH'} && !$self->{'_search_regex'} ? :
393 0 0 if ($width->{'term'} != get_term_width() + 1)
396 0 0 unless (@{$tbl_print;})
408 0 0 @idxs_tbl_print ? :
409 0 0 if (not defined $row) { }
0 0 elsif ($row < 0) { }
413 0 0 if ($row == -1) { }
0 0 elsif ($row == -13) { }
417 0 0 if ($self->{'_search_regex'})
426 0 0 unless ($self->{'table_expand'})
427 0 0 if $row == 0
430 0 0 if ($ENV{'TC_RESET_AUTO_UP'})
435 0 0 if ($row_was_expanded)
436 0 0 if ($row == 0)
444 0 0 if ($auto_jumped_to_row_0)
450 0 0 if ($self->{'_info_row'} and $row == $#{$tbl_print;})
459 0 0 if (@{$self->{'_idx_search_matches'};}) { }
482 0 0 if ref $str
483 0 0 if ($self->{'color'})
487 0 0 if ($self->{'binary_filter'} and substr($str, 0, 100) =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F]/u)
488 0 0 if ($self->{'binary_filter'} == 2) { }
496 0 0 if ($str =~ /[\p{Cc}\p{Noncharacter_Code_Point}\p{Cs}]/u)
501 0 0 if ($self->{'squash_spaces'})
509 0 0 if ($progress->{'show_progress_bar'})
510 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
537 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
541 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_int_fract/u) { }
542 0 0 if ((length $1 // 0) > $width->{'int'}[$col])
545 0 0 if ((length $2 // 0) > $width->{'fract'}[$col])
551 0 0 if (length $tbl_copy->[$row][$col] > $width->{'cols'}[$col])
558 0 0 if ($str_w > $width->{'cols'}[$col])
563 0 0 if ($progress->{'show_progress_bar'})
564 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
571 0 0 if ($width->{'int'}[$col] + $width->{'fract'}[$col] > $width->{'cols'}[$col])
586 0 0 if ($sum < $avail_w) { }
0 0 elsif ($sum > $avail_w) { }
591 0 0 if ($width->{'col_names'}[$col] > $width->{'cols_calc'}[$col])
594 0 0 if ($sum == $avail_w)
599 0 0 if ($sum == $prev_sum)
605 0 0 if ($self->{'trunc_fract_first'})
610 0 0 if ($width->{'fract_calc'}[$col] and $width->{'fract_calc'}[$col] > 3)
617 0 0 if ($sum == $avail_w)
622 0 0 if ($sum == $prev_sum)
627 0 0 $self->{'col_trim_threshold'} < 2 ? :
634 0 0 if ($width->{'cols_calc'}[$col] > $min_col_width)
636 0 0 if ($reduced_col_w < $min_col_width)
639 0 0 if ($width->{'fract_calc'}[$col] > 2)
641 0 0 if ($width->{'fract_calc'}[$col] < 2)
657 0 0 if ($sum == $prev_sum)
659 0 0 if ($min_col_width < 2)
665 0 0 if ($remainder_w)
670 0 0 if ($width->{'cols_calc'}[$col] < $width->{'cols'}[$col])
672 0 0 if ($width->{'fract_calc'}[$col] < $width->{'fract'}[$col] and $width->{'int'}[$col] + $width->{'fract_calc'}[$col] < $width->{'cols_calc'}[$col])
678 0 0 if ($remainder_w == 0)
683 0 0 if ($remainder_w == $prev_remainder_w)
708 0 0 if ($self->{'color'})
710 0 0 if (defined $tbl_orig->[0][$orig_col])
712 0 0 if (@color)
718 0 0 $col == $#{$$width{'cols_calc'};} ? :
727 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
731 0 0 if ($width->{'fract_calc'}[$col])
732 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_fract/u) { }
0 0 elsif (not $tbl_copy->[$row][$col] =~ /[eE]/u) { }
0 0 elsif ($tbl_copy->[$row][$col] =~ /[eE]-/u and $width->{'fract'}[$col] != $width->{'fract_calc'}[$col]) { }
733 0 0 if (length $1 > $width->{'fract_calc'}[$col]) { }
0 0 elsif (length $1 < $width->{'fract_calc'}[$col]) { }
747 0 0 if (length $tbl_copy->[$row][$col] > $width->{'cols_calc'}[$col]) { }
0 0 elsif (length $tbl_copy->[$row][$col] < $width->{'cols_calc'}[$col]) { }
748 0 0 $tbl_copy->[$row][$col] < 0 ? :
751 0 0 if ($precision == -1)
755 0 0 if ($precision >= 0)
758 0 0 if $precision < 0
762 0 0 if ($precision < 0) { }
0 0 elsif ($precision == 0 and length $tbl_copy->[$row][$col] < $width->{'cols_calc'}[$col]) { }
782 0 0 if ($self->{'color'})
784 0 0 if (defined $tbl_orig->[$row][$orig_col])
786 0 0 if (@color)
792 0 0 $col == $#{$$width{'cols_calc'};} ? :
795 0 0 if ($progress->{'show_progress_bar'})
796 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
801 0 0 if ($progress->{'show_progress_bar'})
811 0 0 if ($self->{'expanded_max_width'} and $self->{'expanded_max_width'} < $avail_w)
815 0 0 if ($max_key_w > int $avail_w / 3)
825 0 0 if ($self->{'expanded_line_spacing'})
830 0 0 if ($self->{'color'})
832 0 0 if push @key_color, $1
834 0 0 if ($self->{'binary_filter'} and substr($key, 0, 100) =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F]/u) { }
0 0 elsif ($key =~ /[\p{Cc}\p{Noncharacter_Code_Point}\p{Cs}]/u) { }
835 0 0 if ($self->{'binary_filter'} == 2) { }
841 0 0 if (@key_color)
851 0 0 if ($key_w > $max_key_w) { }
0 0 elsif ($key_w < $max_key_w) { }
857 0 0 if (@key_color)
863 0 0 if (ref $value)
870 0 0 if (not $count++) { }
879 0 0 if ($self->{'expanded_line_spacing'})
894 0 0 unless ($self->{'search'})
905 0 0 defined $error_message ? :
910 0 0 unless (length $string)
914 0 0 unless (eval { do { $self->{'_search_regex'} = $self->{'search'} == 1 ? "(?i:$string)" : $string; "Teststring" =~ /$self->{'_search_regex'}/u; 1 } })
915 0 0 $self->{'search'} == 1 ? :
919 0 0 $default eq $string ? :
930 0 0 if ($tbl_orig->[$idx_row][$_] =~ /$self->{'_search_regex'}/u)
936 0 0 unless (@{$self->{'_idx_search_matches'};})