Branch Coverage

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


line true false branch
26 0 1 if ($^O eq "MSWin32")
35 0 0 if @_ > 1
38 0 0 if (defined $opt)
39 0 0 if ref $opt ne "HASH"
42 0 0 if defined $opt->{$key}
109 0 0 if ($self->{'hide_cursor'})
112 0 0 if (exists $self->{'backup_instance_defaults'})
115 0 0 if ($key eq 'plugin' or $key eq 'backup_instance_defaults') { }
0 0 elsif (exists $instance_defaults->{$key}) { }
130 0 0 if (ref $_[0] ne "Term::TablePrint")
137 0 0 if @_ < 1 or @_ > 2
138 0 0 if ref $tbl_orig ne "ARRAY"
139 0 0 if (defined $opt)
140 0 0 if ref $opt ne "HASH"
143 0 0 if defined $opt->{$key}
147 0 0 unless ($self->{'tab_width'} % 2)
156 0 0 if (print_columns($self->{'decimal_separator'}) != 1)
159 0 0 if ($self->{'decimal_separator'} ne ".")
162 0 0 if ($self->{'hide_cursor'})
165 0 0 unless (@$tbl_orig)
176 0 0 if ($self->{'max_rows'} and $data_row_count > $self->{'max_rows'})
181 0 0 $^O eq 'MSWin32' || $^O eq 'cygwin' ? :
199 0 0 unless (defined $term_w)
208 0 0 if (not defined $next) { }
0 0 elsif ($next == $mr->{'last'}) { }
0 0 elsif ($next == $mr->{'window_width_changed'}) { }
0 0 elsif ($next == $mr->{'enter_search_string'}) { }
0 0 elsif ($next == $mr->{'returned_from_filtered_table'}) { }
216 0 0 unless (defined $term_w)
247 0 0 unless (defined $w_cols_calc)
253 0 0 if (length $self->{'prompt'})
256 0 0 if (length $self->{'info'} or length $self->{'prompt'})
262 0 0 if ($const->{'info_row'})
263 0 0 if (print_columns($const->{'info_row'}) > $tbl_w) { }
278 0 0 if ($search->{'filter'})
283 0 0 if ($self->{'footer'})
285 0 0 if ($search->{'filter'})
289 0 0 exists $ENV{'TC_POS_AT_SEARCH'} && !$search->{'filter'} ? :
294 0 0 if ($term_w != get_term_width() + $const->{'extra_w'})
297 0 0 unless (@{$tbl_print;})
309 0 0 @idxs_tbl_print ? :
310 0 0 if (not defined $row) { }
0 0 elsif ($row < 0) { }
314 0 0 if ($row == -1) { }
0 0 elsif ($row == -13) { }
318 0 0 if ($search->{'filter'})
327 0 0 if (not $self->{'table_expand'}) { }
328 0 0 if ($row == 0)
334 0 0 if ($old_row == $row)
335 0 0 if ($row == 0) { }
0 0 elsif ($ENV{'TC_RESET_AUTO_UP'}) { }
336 0 0 if ($self->{'table_expand'})
337 0 0 if ($row_is_expanded)
340 0 0 if ($auto_jumped_to_first_row == 1)
358 0 0 if ($const->{'info_row'} and $row == $#{$tbl_print;})
367 0 0 if (@{$search->{'map_indexes'};}) { }
388 0 0 unless defined $str
389 0 0 if ref $str
390 0 0 if ($self->{'squash_spaces'})
395 0 0 if ($self->{'color'})
399 0 0 if ($self->{'binary_filter'} and substr($str, 0, 100) =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F]/)
401 0 0 if ($self->{'binary_filter'} == 2) { }
414 0 0 if (@$tbl_copy == $self->{'max_rows'})
417 0 0 if ($progress->{'count_progress_bars'})
418 0 0 if ($count >= $progress->{'next_update'})
424 0 0 if ($progress->{'count_progress_bars'})
448 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
452 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_number/) { }
453 0 0 if ((length $1 // 0) > $w_int->[$col])
456 0 0 if ((length $2 // 0) > $w_fract->[$col])
462 0 0 if (length $tbl_copy->[$row][$col] > $w_cols->[$col])
469 0 0 if ($str_w > $w_cols->[$col])
474 0 0 if ($progress->{'count_progress_bars'})
475 0 0 if ($count >= $progress->{'next_update'})
482 0 0 if ($w_int->[$col] + $w_fract->[$col] > $w_cols->[$col])
487 0 0 if ($progress->{'count_progress_bars'})
499 0 0 if ($sum < $avail_w) { }
0 0 elsif ($sum > $avail_w) { }
504 0 0 if ($w_col_names->[$col] > $w_cols_calc->[$col])
507 0 0 if ($sum == $avail_w)
512 0 0 if ($sum == $prev_sum)
518 0 0 if ($self->{'trunc_fract_first'})
523 0 0 if ($w_fract->[$col] and $w_fract->[$col] > 3)
530 0 0 if ($sum == $avail_w)
535 0 0 if ($sum == $prev_sum)
540 0 0 $self->{'min_col_width'} < 2 ? :
546 0 0 if ($w_cols_calc->[$col] > $min_col_width)
548 0 0 if ($reduced_col_w < $min_col_width)
551 0 0 if ($w_fract->[$col] > 2)
553 0 0 if ($w_fract->[$col] < 2)
569 0 0 if ($sum == $prev_sum)
571 0 0 if ($min_col_width == 2)
578 0 0 if ($remainder_w)
583 0 0 if ($w_cols_calc->[$col] < $w_cols->[$col])
586 0 0 if ($remainder_w == 0)
591 0 0 if ($remainder_w == $prev_remainder_w)
613 0 0 if (not length $tbl_copy->[$row][$col]) { }
0 0 elsif (&looks_like_number($tbl_copy->[$row][$col])) { }
618 0 0 if ($w_fract->[$col]) { }
620 0 0 if ($tbl_copy->[$row][$col] =~ /$regex_number/) { }
621 0 0 if (length $2) { }
622 0 0 if (length $2 > $w_fract->[$col]) { }
0 0 elsif (length $2 < $w_fract->[$col]) { }
635 0 0 length $1 ? :
645 0 0 if (length $number > $w_cols_calc->[$col]) { }
0 0 elsif (length $number < $w_cols_calc->[$col]) { }
646 0 0 $number =~ /^-/ ? :
648 0 0 if ($w_cols_calc->[$col] < $signed_1_precision_w) { }
658 0 0 if (length $number > $w_cols_calc->[$col]) { }
0 0 elsif (length $number < $w_cols_calc->[$col]) { }
678 0 0 if ($str_w > $w_cols_calc->[$col]) { }
0 0 elsif ($str_w < $w_cols_calc->[$col]) { }
688 0 0 if ($self->{'color'})
689 0 0 if (defined $tbl_orig->[$row][$col])
692 0 0 if (@color)
697 0 0 if ($col != $#$w_cols_calc)
702 0 0 if ($progress->{'count_progress_bars'})
703 0 0 if ($count >= $progress->{'next_update'})
709 0 0 if ($progress->{'count_progress_bars'})
720 0 0 if ($max_key_w > int $term_w / 3)
734 0 0 if ($self->{'color'})
736 0 0 if push @key_color, $1
738 0 0 if ($self->{'binary_filter'} and substr($key, 0, 100) =~ /[\x00-\x08\x0B-\x0C\x0E-\x1F]/)
740 0 0 if ($self->{'binary_filter'} == 2) { }
751 0 0 if ($key_w > $max_key_w) { }
0 0 elsif ($key_w < $max_key_w) { }
757 0 0 if (@key_color)
763 0 0 unless (length $value)
766 0 0 if (ref $value)
769 0 0 if ($self->{'color'})
771 0 0 if ($col and length $tbl_orig->[$row][$col - 1])
774 0 0 if ($last_color_prev_value)
782 0 0 if (not $count++) { }
803 0 0 unless ($self->{'search'})
814 0 0 defined $error_message ? :
819 0 0 unless (length $string)
823 0 0 unless (eval { do { $search->{'filter'} = $self->{'search'} == 1 ? qr/$string/i : qr/$string/; "Teststring" =~ /$search->{'filter'}/; 1 } })
824 0 0 $self->{'search'} == 1 ? :
828 0 0 $default eq $string ? :
840 0 0 if ($tbl_orig->[$idx_row][$_] =~ /$search->{'filter'}/)
846 0 0 unless (@{$search->{'map_indexes'};})
873 0 0 if ($col != $#$w_cols_calc)