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'})
222 0 0 unless (defined $term_w)
231 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) { }
239 0 0 unless (defined $term_w)
265 0 0 if (defined $next and $next == $window_width_changed) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
276 0 0 unless (defined $cols)
283 0 0 $self->{'choose_columns'} ? :
288 0 0 if ($tab_w < 1)
289 0 0 if ($self->{'choose_columns'}) { }
290 0 0 unless ($desired_cols)
294 0 0 unless ($self->{'tab_width'} % 2)
307 0 0 unless (defined $new_cols)
319 0 0 unless ($desired_cols)
331 0 0 unless ($self->{'tab_width'} % 2)
335 0 0 unless (defined $desired_cols)
348 0 0 unless (defined $w_cols_calc)
354 0 0 if (length $self->{'prompt'})
357 0 0 if (length $self->{'info'} or length $self->{'prompt'})
363 0 0 if ($self->{'_info_row'})
364 0 0 if (print_columns($self->{'_info_row'}) > $tbl_w) { }
379 0 0 if ($self->{'_search_regex'}) { }
0 0 elsif ($self->{'choose_columns'} == 1) { }
390 0 0 if ($self->{'footer'})
392 0 0 if ($self->{'_search_regex'})
396 0 0 exists $ENV{'TC_POS_AT_SEARCH'} && !$self->{'_search_regex'} ? :
401 0 0 if ($term_w != get_term_width() + 1)
404 0 0 unless (@{$tbl_print;})
416 0 0 @idxs_tbl_print ? :
417 0 0 if (not defined $row) { }
0 0 elsif ($row < 0) { }
421 0 0 if ($row == -1) { }
0 0 elsif ($row == -13) { }
425 0 0 if ($self->{'_search_regex'})
434 0 0 unless ($self->{'table_expand'})
435 0 0 if $row == 0
438 0 0 if ($ENV{'TC_RESET_AUTO_UP'})
443 0 0 if ($row_was_expanded)
444 0 0 if ($row == 0)
452 0 0 if ($auto_jumped_to_row_0)
458 0 0 if ($self->{'_info_row'} and $row == $#{$tbl_print;})
467 0 0 if (@{$self->{'_idx_search_matches'};}) { }
490 0 0 if ref $str
491 0 0 if ($self->{'color'})
495 0 0 if ($self->{'binary_filter'} and substr($str, 0, 100) =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F]/u)
496 0 0 if ($self->{'binary_filter'} == 2) { }
505 0 0 if ($str =~ /[\p{Cc}\p{Noncharacter_Code_Point}\p{Cs}]/u)
510 0 0 if ($self->{'squash_spaces'})
518 0 0 if ($progress->{'show_progress_bar'})
519 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
546 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
550 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_int_fract/u) { }
551 0 0 if ((length $1 // 0) > $w_int->[$col])
554 0 0 if ((length $2 // 0) > $w_fract->[$col])
560 0 0 if (length $tbl_copy->[$row][$col] > $w_cols->[$col])
567 0 0 if ($str_w > $w_cols->[$col])
572 0 0 if ($progress->{'show_progress_bar'})
573 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
579 0 0 if ($w_int->[$col] + $w_fract->[$col] > $w_cols->[$col])
593 0 0 if ($sum < $avail_w) { }
0 0 elsif ($sum > $avail_w) { }
598 0 0 if ($w_col_names->[$col] > $w_cols_calc->[$col])
601 0 0 if ($sum == $avail_w)
606 0 0 if ($sum == $prev_sum)
612 0 0 if ($self->{'trunc_fract_first'})
617 0 0 if ($w_fract->[$col] and $w_fract->[$col] > 3)
624 0 0 if ($sum == $avail_w)
629 0 0 if ($sum == $prev_sum)
634 0 0 $self->{'col_trim_threshold'} < 2 ? :
641 0 0 if ($w_cols_calc->[$col] > $min_col_width)
643 0 0 if ($reduced_col_w < $min_col_width)
646 0 0 if ($w_fract->[$col] > 2)
648 0 0 if ($w_fract->[$col] < 2)
665 0 0 if ($sum == $prev_sum)
667 0 0 if ($min_col_width < 2)
674 0 0 if ($remainder_w)
679 0 0 if ($w_cols_calc->[$col] < $w_cols->[$col])
682 0 0 if ($remainder_w == 0)
687 0 0 if ($remainder_w == $prev_remainder_w)
714 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
718 0 0 if ($w_fract->[$col])
719 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_fract/u) { }
720 0 0 if (length $1 > $w_fract->[$col]) { }
0 0 elsif (length $1 < $w_fract->[$col]) { }
734 0 0 if (length $tbl_copy->[$row][$col] > $w_cols_calc->[$col]) { }
0 0 elsif (length $tbl_copy->[$row][$col] < $w_cols_calc->[$col]) { }
735 0 0 $tbl_copy->[$row][$col] =~ /^-/u ? :
737 0 0 if ($w_cols_calc->[$col] < $signed_one_precision_w) { }
748 0 0 if (length $tbl_copy->[$row][$col] > $w_cols_calc->[$col]) { }
0 0 elsif (length $tbl_copy->[$row][$col] < $w_cols_calc->[$col]) { }
769 0 0 if ($self->{'color'})
771 0 0 if (defined $tbl_orig->[$row][$orig_col])
773 0 0 if (@color)
788 0 0 $col == $w_cols_calc->$#* ? :
791 0 0 if ($progress->{'show_progress_bar'})
792 0 0 if (++$progress->{'count'} > $progress->{'next_update'})
797 0 0 if ($progress->{'show_progress_bar'})
807 0 0 if ($self->{'expanded_max_width'} and $self->{'expanded_max_width'} < $avail_w)
811 0 0 if ($max_key_w > int $avail_w / 3)
821 0 0 if ($self->{'expanded_line_spacing'})
826 0 0 if ($self->{'color'})
828 0 0 if push @key_color, $1
830 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) { }
831 0 0 if ($self->{'binary_filter'} == 2) { }
837 0 0 if (@key_color)
847 0 0 if ($key_w > $max_key_w) { }
0 0 elsif ($key_w < $max_key_w) { }
853 0 0 if (@key_color)
859 0 0 unless (length $value)
862 0 0 if (ref $value)
869 0 0 if (not $count++) { }
878 0 0 if ($self->{'expanded_line_spacing'})
893 0 0 unless ($self->{'search'})
904 0 0 defined $error_message ? :
909 0 0 unless (length $string)
913 0 0 unless (eval { do { $self->{'_search_regex'} = $self->{'search'} == 1 ? "(?i:$string)" : $string; "Teststring" =~ /$self->{'_search_regex'}/u; 1 } })
914 0 0 $self->{'search'} == 1 ? :
918 0 0 $default eq $string ? :
929 0 0 if ($tbl_orig->[$idx_row][$_] =~ /$self->{'_search_regex'}/u)
935 0 0 unless (@{$self->{'_idx_search_matches'};})