Branch Coverage

blib/lib/Term/TablePrint.pm
Criterion Covered Total %
branch 1 306 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)
260 0 0 if (defined $next and $next == $window_width_changed) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
266 0 0 unless (defined $cols)
273 0 0 $self->{'choose_columns'} ? :
278 0 0 if ($width->{'tab'} < 1)
279 0 0 if ($self->{'choose_columns'}) { }
280 0 0 unless ($desired_cols)
284 0 0 unless ($self->{'tab_width'} % 2)
293 0 0 unless (defined $new_cols)
313 0 0 unless ($desired_cols)
325 0 0 unless ($self->{'tab_width'} % 2)
329 0 0 unless (defined $desired_cols)
345 0 0 if (length $self->{'prompt'})
348 0 0 if (length $self->{'info'} or length $self->{'prompt'})
354 0 0 if ($self->{'_info_row'})
355 0 0 if (print_columns($self->{'_info_row'}) > $width->{'table'}) { }
370 0 0 if ($self->{'_search_regex'}) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
381 0 0 if ($self->{'footer'})
383 0 0 if ($self->{'_search_regex'})
387 0 0 exists $ENV{'TC_POS_AT_SEARCH'} && !$self->{'_search_regex'} ? :
392 0 0 if ($width->{'term'} != get_term_width() + 1)
395 0 0 unless (@{$tbl_print;})
407 0 0 @idxs_tbl_print ? :
408 0 0 if (not defined $row) { }
0 0 elsif ($row < 0) { }
412 0 0 if ($row == -1) { }
0 0 elsif ($row == -13) { }
416 0 0 if ($self->{'_search_regex'})
425 0 0 unless ($self->{'table_expand'})
426 0 0 if $row == 0
429 0 0 if ($ENV{'TC_RESET_AUTO_UP'})
434 0 0 if ($row_was_expanded)
435 0 0 if ($row == 0)
443 0 0 if ($auto_jumped_to_row_0)
449 0 0 if ($self->{'_info_row'} and $row == $#{$tbl_print;})
458 0 0 if (@{$self->{'_idx_search_matches'};}) { }
481 0 0 if ref $str
482 0 0 if ($self->{'color'})
486 0 0 if ($self->{'binary_filter'} and substr($str, 0, 100) =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F]/u)
487 0 0 if ($self->{'binary_filter'} == 2) { }
495 0 0 if ($str =~ /[\p{Cc}\p{Noncharacter_Code_Point}\p{Cs}]/u)
500 0 0 if ($self->{'squash_spaces'})
508 0 0 if ($progress->{'show_progress_bar'})
509 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
536 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
540 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_int_fract/u) { }
541 0 0 if ((length $1 // 0) > $width->{'int'}[$col])
544 0 0 if ((length $2 // 0) > $width->{'fract'}[$col])
550 0 0 if (length $tbl_copy->[$row][$col] > $width->{'cols'}[$col])
557 0 0 if ($str_w > $width->{'cols'}[$col])
562 0 0 if ($progress->{'show_progress_bar'})
563 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
570 0 0 if ($width->{'int'}[$col] + $width->{'fract'}[$col] > $width->{'cols'}[$col])
585 0 0 if ($sum < $avail_w) { }
0 0 elsif ($sum > $avail_w) { }
590 0 0 if ($width->{'col_names'}[$col] > $width->{'cols_calc'}[$col])
593 0 0 if ($sum == $avail_w)
598 0 0 if ($sum == $prev_sum)
604 0 0 if ($self->{'trunc_fract_first'})
609 0 0 if ($width->{'fract_calc'}[$col] and $width->{'fract_calc'}[$col] > 3)
616 0 0 if ($sum == $avail_w)
621 0 0 if ($sum == $prev_sum)
626 0 0 $self->{'col_trim_threshold'} < 2 ? :
633 0 0 if ($width->{'cols_calc'}[$col] > $min_col_width)
635 0 0 if ($reduced_col_w < $min_col_width)
638 0 0 if ($width->{'fract_calc'}[$col] > 2)
640 0 0 if ($width->{'fract_calc'}[$col] < 2)
656 0 0 if ($sum == $prev_sum)
658 0 0 if ($min_col_width < 2)
664 0 0 if ($remainder_w)
669 0 0 if ($width->{'cols_calc'}[$col] < $width->{'cols'}[$col])
671 0 0 if ($width->{'fract_calc'}[$col] < $width->{'fract'}[$col] and $width->{'int'}[$col] + $width->{'fract_calc'}[$col] < $width->{'cols_calc'}[$col])
677 0 0 if ($remainder_w == 0)
682 0 0 if ($remainder_w == $prev_remainder_w)
707 0 0 $col == $#{$$width{'cols_calc'};} ? :
716 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
720 0 0 if ($width->{'fract_calc'}[$col])
721 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]) { }
722 0 0 if (length $1 > $width->{'fract_calc'}[$col]) { }
0 0 elsif (length $1 < $width->{'fract_calc'}[$col]) { }
736 0 0 if (length $tbl_copy->[$row][$col] > $width->{'cols_calc'}[$col]) { }
0 0 elsif (length $tbl_copy->[$row][$col] < $width->{'cols_calc'}[$col]) { }
737 0 0 $tbl_copy->[$row][$col] < 0 ? :
740 0 0 if ($precision == -1)
744 0 0 if ($precision >= 0)
747 0 0 if $precision < 0
751 0 0 if ($precision < 0) { }
0 0 elsif ($precision == 0 and length $tbl_copy->[$row][$col] < $width->{'cols_calc'}[$col]) { }
771 0 0 if ($self->{'color'})
773 0 0 if (defined $tbl_orig->[$row][$orig_col])
775 0 0 if (@color)
790 0 0 $col == $#{$$width{'cols_calc'};} ? :
793 0 0 if ($progress->{'show_progress_bar'})
794 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
799 0 0 if ($progress->{'show_progress_bar'})
809 0 0 if ($self->{'expanded_max_width'} and $self->{'expanded_max_width'} < $avail_w)
813 0 0 if ($max_key_w > int $avail_w / 3)
823 0 0 if ($self->{'expanded_line_spacing'})
828 0 0 if ($self->{'color'})
830 0 0 if push @key_color, $1
832 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) { }
833 0 0 if ($self->{'binary_filter'} == 2) { }
839 0 0 if (@key_color)
849 0 0 if ($key_w > $max_key_w) { }
0 0 elsif ($key_w < $max_key_w) { }
855 0 0 if (@key_color)
861 0 0 if (ref $value)
868 0 0 if (not $count++) { }
877 0 0 if ($self->{'expanded_line_spacing'})
892 0 0 unless ($self->{'search'})
903 0 0 defined $error_message ? :
908 0 0 unless (length $string)
912 0 0 unless (eval { do { $self->{'_search_regex'} = $self->{'search'} == 1 ? "(?i:$string)" : $string; "Teststring" =~ /$self->{'_search_regex'}/u; 1 } })
913 0 0 $self->{'search'} == 1 ? :
917 0 0 $default eq $string ? :
928 0 0 if ($tbl_orig->[$idx_row][$_] =~ /$self->{'_search_regex'}/u)
934 0 0 unless (@{$self->{'_idx_search_matches'};})