Branch Coverage

blib/lib/Term/TablePrint.pm
Criterion Covered Total %
branch 1 296 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}) { }
155 0 0 if (ref $_[0] ne __PACKAGE__)
162 0 0 if @_ < 1 or @_ > 2
163 0 0 if ref $tbl_orig ne "ARRAY"
164 0 0 if (defined $opt)
165 0 0 if ref $opt ne "HASH"
174 0 0 if defined $opt->{$key}
177 0 0 if ($self->{'pad_row_edges'})
186 0 0 if (print_columns($self->{'decimal_separator'}) != 1)
189 0 0 if ($self->{'decimal_separator'} ne ".")
192 0 0 if ($self->{'hide_cursor'})
197 0 0 unless (@$tbl_orig and @{$tbl_orig->[0];})
199 0 0 if (not @$tbl_orig) { }
214 0 0 if ($self->{'max_rows'} and $self->{'_last_index'} > $self->{'max_rows'})
217 0 0 if $self->{'pad_row_edges'}
223 0 0 unless (defined $term_w)
232 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) { }
240 0 0 unless (defined $term_w)
267 0 0 if (defined $next and $next == $window_width_changed) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
273 0 0 unless (defined $cols)
280 0 0 $self->{'choose_columns'} ? :
285 0 0 if ($tab_w < 1)
286 0 0 if ($self->{'choose_columns'}) { }
287 0 0 unless ($desired_cols)
291 0 0 unless ($self->{'tab_width'} % 2)
300 0 0 unless (defined $new_cols)
320 0 0 unless ($desired_cols)
332 0 0 unless ($self->{'tab_width'} % 2)
336 0 0 unless (defined $desired_cols)
349 0 0 unless (defined $w_cols_calc)
355 0 0 if (length $self->{'prompt'})
358 0 0 if (length $self->{'info'} or length $self->{'prompt'})
364 0 0 if ($self->{'_info_row'})
365 0 0 if (print_columns($self->{'_info_row'}) > $table_w) { }
380 0 0 if ($self->{'_search_regex'}) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
391 0 0 if ($self->{'footer'})
393 0 0 if ($self->{'_search_regex'})
397 0 0 exists $ENV{'TC_POS_AT_SEARCH'} && !$self->{'_search_regex'} ? :
402 0 0 if ($term_w != get_term_width() + 1)
405 0 0 unless (@{$tbl_print;})
417 0 0 @idxs_tbl_print ? :
418 0 0 if (not defined $row) { }
0 0 elsif ($row < 0) { }
422 0 0 if ($row == -1) { }
0 0 elsif ($row == -13) { }
426 0 0 if ($self->{'_search_regex'})
435 0 0 unless ($self->{'table_expand'})
436 0 0 if $row == 0
439 0 0 if ($ENV{'TC_RESET_AUTO_UP'})
444 0 0 if ($row_was_expanded)
445 0 0 if ($row == 0)
453 0 0 if ($auto_jumped_to_row_0)
459 0 0 if ($self->{'_info_row'} and $row == $#{$tbl_print;})
468 0 0 if (@{$self->{'_idx_search_matches'};}) { }
491 0 0 if ref $str
492 0 0 if ($self->{'color'})
496 0 0 if ($self->{'binary_filter'} and substr($str, 0, 100) =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F]/u)
497 0 0 if ($self->{'binary_filter'} == 2) { }
506 0 0 if ($str =~ /[\p{Cc}\p{Noncharacter_Code_Point}\p{Cs}]/u)
511 0 0 if ($self->{'squash_spaces'})
519 0 0 if ($progress->{'show_progress_bar'})
520 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
547 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
551 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_int_fract/u) { }
552 0 0 if ((length $1 // 0) > $w_int->[$col])
555 0 0 if ((length $2 // 0) > $w_fract->[$col])
561 0 0 if (length $tbl_copy->[$row][$col] > $w_cols->[$col])
568 0 0 if ($str_w > $w_cols->[$col])
573 0 0 if ($progress->{'show_progress_bar'})
574 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
581 0 0 if ($w_int->[$col] + $w_fract->[$col] > $w_cols->[$col])
595 0 0 if ($sum < $avail_w) { }
0 0 elsif ($sum > $avail_w) { }
600 0 0 if ($w_col_names->[$col] > $w_cols_calc->[$col])
603 0 0 if ($sum == $avail_w)
608 0 0 if ($sum == $prev_sum)
614 0 0 if ($self->{'trunc_fract_first'})
619 0 0 if ($w_fract->[$col] and $w_fract->[$col] > 3)
626 0 0 if ($sum == $avail_w)
631 0 0 if ($sum == $prev_sum)
636 0 0 $self->{'col_trim_threshold'} < 2 ? :
643 0 0 if ($w_cols_calc->[$col] > $min_col_width)
645 0 0 if ($reduced_col_w < $min_col_width)
648 0 0 if ($w_fract->[$col] > 2)
650 0 0 if ($w_fract->[$col] < 2)
667 0 0 if ($sum == $prev_sum)
669 0 0 if ($min_col_width < 2)
675 0 0 if ($remainder_w)
680 0 0 if ($w_cols_calc->[$col] < $w_cols->[$col])
683 0 0 if ($remainder_w == 0)
688 0 0 if ($remainder_w == $prev_remainder_w)
715 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
719 0 0 if ($w_fract->[$col])
720 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_fract/u) { }
721 0 0 if (length $1 > $w_fract->[$col]) { }
0 0 elsif (length $1 < $w_fract->[$col]) { }
735 0 0 if (length $tbl_copy->[$row][$col] > $w_cols_calc->[$col]) { }
0 0 elsif (length $tbl_copy->[$row][$col] < $w_cols_calc->[$col]) { }
736 0 0 $tbl_copy->[$row][$col] =~ /^-/u ? :
738 0 0 if ($w_cols_calc->[$col] < $signed_one_precision_w) { }
749 0 0 if (length $tbl_copy->[$row][$col] > $w_cols_calc->[$col]) { }
0 0 elsif (length $tbl_copy->[$row][$col] < $w_cols_calc->[$col]) { }
770 0 0 if ($self->{'color'})
772 0 0 if (defined $tbl_orig->[$row][$orig_col])
774 0 0 if (@color)
789 0 0 $col == $w_cols_calc->$#* ? :
792 0 0 if ($progress->{'show_progress_bar'})
793 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
798 0 0 if ($progress->{'show_progress_bar'})
808 0 0 if ($self->{'expanded_max_width'} and $self->{'expanded_max_width'} < $avail_w)
812 0 0 if ($max_key_w > int $avail_w / 3)
822 0 0 if ($self->{'expanded_line_spacing'})
827 0 0 if ($self->{'color'})
829 0 0 if push @key_color, $1
831 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) { }
832 0 0 if ($self->{'binary_filter'} == 2) { }
838 0 0 if (@key_color)
848 0 0 if ($key_w > $max_key_w) { }
0 0 elsif ($key_w < $max_key_w) { }
854 0 0 if (@key_color)
860 0 0 if (ref $value)
867 0 0 if (not $count++) { }
876 0 0 if ($self->{'expanded_line_spacing'})
891 0 0 unless ($self->{'search'})
902 0 0 defined $error_message ? :
907 0 0 unless (length $string)
911 0 0 unless (eval { do { $self->{'_search_regex'} = $self->{'search'} == 1 ? "(?i:$string)" : $string; "Teststring" =~ /$self->{'_search_regex'}/u; 1 } })
912 0 0 $self->{'search'} == 1 ? :
916 0 0 $default eq $string ? :
927 0 0 if ($tbl_orig->[$idx_row][$_] =~ /$self->{'_search_regex'}/u)
933 0 0 unless (@{$self->{'_idx_search_matches'};})