Branch Coverage

blib/lib/Term/Clui.pm
Criterion Covered Total %
branch 2 594 0.3


line true false branch
94 0 0 if ($s =~ /\r\n?$/) { }
101 0 0 if (not $attr) { }
104 0 0 if ($attr & $A_BOLD)
105 0 0 if ($attr & $A_REVERSE)
106 0 0 if ($attr & $A_UNDERLINE)
119 0 0 if ($have_Term_ReadKey) { }
134 0 0 if ($c eq "\e") { }
137 0 0 unless (defined $c)
138 0 0 if ($c eq 'A')
139 0 0 if ($c eq 'B')
140 0 0 if ($c eq 'C')
141 0 0 if ($c eq 'D')
142 0 0 if ($c eq '2')
143 0 0 if ($c eq '3')
144 0 0 if ($c eq '5')
145 0 0 if ($c eq '6')
146 0 0 if ($c eq 'Z')
147 0 0 if ($c eq 'O')
149 0 0 if ($c eq 'A')
150 0 0 if ($c eq 'B')
151 0 0 if ($c eq 'C')
152 0 0 if ($c eq 'D')
153 0 0 if ($c eq 'F')
154 0 0 if ($c eq 'H')
157 0 0 if ($c eq '[')
159 0 0 if ($c eq 'A')
160 0 0 if ($c eq 'B')
161 0 0 if ($c eq 'C')
162 0 0 if ($c eq 'D')
163 0 0 if ($c eq 'F')
164 0 0 if ($c eq 'H')
165 0 0 if ($c eq 'M')
176 0 0 if ($low3bits == 3) { }
179 0 0 if ($event_type & 64) { }
186 0 0 if ($c =~ /\d/)
187 0 0 if ($c1 eq '~') { }
188 0 0 if ($c eq '2') { }
0 0 elsif ($c eq '3') { }
0 0 elsif ($c eq '5') { }
0 0 elsif ($c eq '6') { }
196 0 0 if $c1 eq ';'
204 0 0 if $c1 eq 'R'
210 0 0 if ($c eq 'Z')
252 0 0 if ($newcol == 0) { }
0 0 elsif ($newcol > $icol) { }
0 0 elsif ($newcol < $icol) { }
256 0 0 if ($newrow > $irow) { }
0 0 elsif ($newrow < $irow) { }
270 0 0 if ($ENV{'CLUI_MOUSE'} eq 'OFF')
271 0 0 if ($IsMouseMode)
274 0 0 if ($EncodingString)
276 0 0 unless open TTYIN, '<:bytes', '/dev/tty'
285 0 0 unless ($IsMouseMode)
288 0 0 if ($EncodingString)
290 0 0 unless open TTYIN, "<$EncodingString", '/dev/tty'
300 0 0 unless ($SpeakUpSilentFile)
301 0 0 if ($IsSpeakUpSilent)
304 0 0 if (open S, '>', $SpeakUpSilentFile)
310 0 0 unless ($SpeakUpSilentFile)
311 0 0 unless ($IsSpeakUpSilent)
314 0 0 if (open S, '>', $SpeakUpSilentFile)
321 0 0 if ($ENV{'CLUI_MOUSE'} eq 'OFF')
323 0 0 if ($InitscrAlreadyRun)
325 0 0 if (not $mouse_mode and $IsMouseMode) { }
0 0 elsif ($mouse_mode and not $IsMouseMode) { }
326 0 0 unless leave_mouse_mode()
328 0 0 unless enter_mouse_mode()
331 0 0 if (not $speakup_silent and $IsSpeakUpSilent) { }
0 0 elsif ($speakup_silent and not $IsSpeakUpSilent) { }
332 0 0 unless leave_speakup_silent()
334 0 0 unless enter_speakup_silent()
340 0 0 unless open TTY, ">$EncodingString", '/dev/tty'
342 0 0 unless ($have_Term_ReadKey)
344 0 0 if ($mouse_mode) { }
350 0 0 if ($speakup_silent and not $IsSpeakUpSilent)
351 0 0 unless open TTYIN, "<$encoding_string", '/dev/tty'
354 0 0 if ($have_Term_ReadKey) { }
357 0 0 if ($^O =~ /^FreeBSD$/i) { }
368 0 0 if ($InitscrAlreadyRun > 1)
369 0 0 if ($IsMouseMode and not $WasMouseMode) { }
0 0 elsif (not $IsMouseMode and $WasMouseMode) { }
372 0 0 if ($IsSpeakUpSilent and not $WasSpeakUpSilent) { }
0 0 elsif (not $IsSpeakUpSilent and $WasSpeakUpSilent) { }
380 0 0 if ($IsSpeakUpSilent)
381 0 0 if ($have_Term_ReadKey) { }
386 0 0 if $Stty
0 0 if ($^O =~ /^FreeBSD$/i) { }
387 0 0 if $Stty
399 0 0 unless ($size_changed)
400 0 0 if ($have_Term_ReadKey) { }
0 0 elsif ($have_Term_Size) { }
410 0 0 if (@OtherLines)
425 0 0 if ($@)
441 0 0 unless $question
446 0 0 if (defined $default) { }
458 0 0 if ($c eq "\r")
459 0 0 if ($size_changed)
462 0 0 if ($c == $KEY_LEFT) { }
0 0 elsif ($c == $KEY_RIGHT) { }
0 0 elsif ($c == $KEY_DELETE) { }
0 0 elsif ($c eq "\cH" or $c eq "\177") { }
0 0 elsif ($c eq "\cC") { }
0 0 elsif ($c eq "\cX" or $c eq "\cD") { }
0 0 elsif ($c eq "\cA" or $c == $KEY_HOME) { }
0 0 elsif ($c eq "\cE" or $c == $KEY_END) { }
0 0 elsif ($c eq "\f") { }
0 0 elsif ($SpecialKey{$c}) { }
0 0 elsif (ord $c >= 32) { }
463 0 0 if ($i > 0)
465 0 0 $silent ? :
0 0 if ($i < $n)
467 0 0 if ($i < $n)
469 0 0 $silent ? :
473 0 0 if ($i > 0)
475 0 0 unless ($silent)
477 0 0 $silent ? :
491 0 0 $silent ? :
492 0 0 unless ($silent)
494 0 0 $silent ? :
505 0 0 unless (open DEBUG, '>>/tmp/clui.log')
519 0 0 unless @list
535 0 0 if (wantarray) { }
537 0 0 if ($firstlinelength < $maxcols - 30) { }
0 0 elsif ($firstlinelength < $maxcols - 16) { }
0 0 elsif ($firstlinelength < $maxcols - 9) { }
546 0 0 if ($nrows >= $maxrows) { }
551 0 0 if ($nrows >= $maxrows) { }
555 0 0 if ($nrows >= $maxrows)
557 0 0 unless (@list)
559 0 0 wantarray ? :
571 0 0 if ($size_changed)
573 0 0 if ($nrows >= $maxrows)
575 0 0 unless (@list)
577 0 0 wantarray ? :
583 0 0 if ($c eq 'q' or $c eq "\cD" or $c eq "\cX") { }
0 0 elsif ($c eq "\t" and $this_cell < $#list) { }
0 0 elsif ($c eq 'l' || $c == $KEY_RIGHT and $this_cell < $#list and $irow[$this_cell] == $irow[$this_cell + 1]) { }
0 0 elsif ($c eq "\cH" || $c == $KEY_BTAB and $this_cell > 0) { }
0 0 elsif ($c eq 'h' || $c == $KEY_LEFT and $this_cell > 0 and $irow[$this_cell] == $irow[$this_cell - 1]) { }
0 0 elsif ($c eq 'j' || $c == $KEY_DOWN and $irow < $nrows) { }
0 0 elsif ($c eq 'k' || $c == $KEY_UP and $irow > 1) { }
0 0 elsif ($c eq "\f") { }
0 0 elsif ($c eq "\cC") { }
0 0 elsif ($c eq "\r") { }
0 0 elsif ($c eq ' ') { }
0 0 elsif ($c eq '?') { }
585 0 0 if ($clue_has_been_given)
588 0 0 if ($re_clue) { }
595 0 0 wantarray ? :
599 0 0 wantarray ? :
618 0 0 if $icol[$inew] < $mid_col
623 0 0 if $new_mid_col >= $mid_col
624 0 0 if $icol[$inew + 1] <= $icol[$inew]
627 0 0 if ($new_mid_col - $mid_col > $left_of_target)
635 0 0 if $irow[$inew] < $irow[$this_cell]
639 0 0 unless $icol[$inew]
641 0 0 if $new_mid_col <= $mid_col
644 0 0 if ($mid_col - $new_mid_col > $right_of_target)
649 0 0 if ($size_changed)
651 0 0 if ($nrows >= $maxrows)
653 0 0 unless (@list)
656 0 0 wantarray ? :
667 0 0 if (wantarray) { }
669 0 0 if ($marked[$i] or $i == $this_cell)
678 0 0 if ($remaining - length($_) < 4) { }
684 0 0 unless ($dotsprinted)
685 0 0 if ($remaining - length($last) > 0) { }
0 0 elsif ($remaining > 2) { }
697 0 0 if (wantarray) { }
703 0 0 if (wantarray)
724 0 0 if ($l[$i] > $maxcols - 1)
725 0 0 if ($icol + $l[$i] >= $maxcols)
726 0 0 if ($irow > $maxrows)
729 0 0 if ($list[$i] eq $choice)
735 0 0 unless $i == $this_cell
738 0 0 if ($notherlines and $nrows + $notherlines < $maxrows)
747 0 0 if ($marked[$i])
748 0 0 if ($i == $this_cell)
750 0 0 if ($marked[$i] or $i == $this_cell)
755 0 0 if ($erase_rows)
756 0 0 if ($erase_rows > $maxrows)
767 0 0 if ($IsMouseMode)
771 0 0 if ($size_changed)
773 0 0 if ($nrows < $maxrows)
777 0 0 if ($c == $KEY_LEFT and $i > 0) { }
0 0 elsif ($c == $KEY_RIGHT) { }
0 0 elsif ($c eq "\cH" or $c eq "\177") { }
0 0 elsif ($c eq "\cC") { }
0 0 elsif ($c eq "\cX" or $c eq "\cD") { }
0 0 elsif ($c eq "\cA") { }
0 0 elsif ($c eq "\cE") { }
0 0 elsif ($c eq "\f") { }
0 0 elsif ($SpecialKey{$c}) { }
0 0 elsif (ord $c >= 32) { }
779 0 0 if ($i < $n)
781 0 0 if ($i > 0)
792 0 0 unless (@s)
813 0 0 if ($nchoices == 1 or $nchoices and $nrows < $maxrows)
822 0 0 if ($nchoices) { }
823 0 0 if ($s) { }
843 0 0 if ($ENV{'CLUI_DIR'} =~ /off/i)
844 0 0 unless ($question)
848 0 0 if (dbmopen %CHOICES, &dbm_file(), 384) { }
851 0 0 if ($! eq 'Resource temporarily unavailable') { }
858 0 0 if (wantarray) { }
863 0 0 if ($ENV{'CLUI_DIR'} =~ /off/i)
864 0 0 unless ($question)
867 0 0 if (dbmopen %CHOICES, &dbm_file(), 384) { }
870 0 0 if ($! eq 'Resource temporarily unavailable') { }
880 0 0 if ($ENV{'CLUI_DIR'} =~ /off/i)
882 0 0 if ($ENV{'CLUI_DIR'}) { }
892 0 0 if ($LastEventWasPress)
893 0 0 unless $y >= $TopRow
900 0 0 if ($irow[$i] == $mouse_row)
902 0 0 if ($icol[$i] < $mouse_col and $icol[$i] + length($list[$i]) >= $mouse_col)
906 0 0 if $irow[$i] > $mouse_row
910 0 0 unless $found
913 0 0 if ($button_pressed == 1 and not $button_drag) { }
0 0 elsif ($button_pressed == 3 and not $button_drag) { }
920 0 0 if ($i != $this_cell)
928 0 0 if ($_[0] eq 'ask')
932 0 0 if ($ENV{'CLUI_MOUSE'} eq 'OFF') { }
937 0 0 if ($_[0] =~ /^mult/)
941 0 0 if ($ENV{'CLUI_MOUSE'} eq 'OFF') { }
951 0 0 unless $question
0 0 unless -t STDERR
957 0 0 if ($response eq "\cC")
961 0 0 if $response =~ /[yYnN]/
965 0 0 if ($response =~ /^[yY]/) { }
973 0 0 if ($response =~ /^[yY]/) { }
982 0 0 if ($argc == 0) { }
0 0 elsif ($argc == 2) { }
0 0 elsif ($argc == 1) { }
990 0 0 unless (open F, ">$file")
994 0 0 unless (open F, "< $file")
1001 0 0 if (-d $file)
1002 0 0 if (-B _ and -s _)
1003 0 0 if (-T _ and not -w _)
1006 0 0 if ($file =~ m[/]) { }
1019 0 0 unless (-d $rcsdir)
1020 0 0 if (-d _ and not -w _)
1023 0 0 if ($rcs_ok and -f $rcsfile and not -f $file)
1033 0 0 if ($rcs_ok and -T $file)
1034 0 0 if (not -f $rcsfile) { }
1037 0 0 if ($msg)
1044 0 0 if ($msg)
1053 0 0 if (not open(LOG, ">> $rcslog")) { }
1056 0 0 if (not $pid)
1059 0 0 if ($pid == 0)
1079 0 0 if (open TTY, ">$EncodingString", '/dev/tty') { }
1093 0 0 if (not $text and $title =~ /\.doc$/i and -r $title) { }
0 0 elsif (not $text and -T $title and open F, "< $title") { }
1094 0 0 if ($wvText)
1099 0 0 if ($antiword)
1102 0 0 if ($catdoc)
1109 0 0 if $nlines++ > $maxrows
1110 0 0 if ($nlines > 0.6 * $maxrows) { }
1118 0 0 if ($#lines < 21) { }
1123 0 0 unless (open TMP, ">$tmp")
1132 0 0 unless $text
1138 0 0 if (3 > scalar @rows)
1143 0 0 if ($titlelength > $maxcols - 35) { }
1152 0 0 if ($c eq 'q' or $c eq "\cX" or $c eq "\cW" or $c eq "\cZ" or $c eq "\cC" or $c eq "\034\\") { }
0 0 elsif ($c eq "\r") { }
0 0 elsif ($c eq "\f") { }
1168 0 0 if -x $f
1172 0 1 if ($Eflite_FH) { }
0 1 elsif ($Espeak_PID) { }
1178 0 0 unless length $text
1180 0 0 if ($SpeakMode{'dot'})
1184 0 0 if ($Eflite_FH) { }
0 0 elsif ($Espeak) { }
1185 0 0 if (length $text == 1) { }
1186 0 0 if ($text eq '.') { }
1189 0 0 if ($wait)
1193 0 0 if ($wait)
1196 0 0 if ($Espeak_PID)
1198 0 0 if ($Espeak_PID) { }
1199 0 0 if ($wait)
1200 0 0 if (length $text == 1) { }
1208 0 0 if ($espeak_PID = open($espeak_FH, '|-', $Espeak)) { }
1216 0 0 if ($text eq '.') { }
1230 0 0 if ($options{'nofirstline'}) { }
1235 0 0 if ($firstline)
1237 0 0 if (@OtherLines)
1252 0 0 if ($i_line =~ /^\s*$/)
1253 0 0 if ($o_line)
1254 0 0 unless ($last_line_empty)
1259 0 0 if ($options{'nofill'})
1262 0 0 if ($i_line =~ s/^(\s+)//) { }
1264 0 0 if ($o_line)
1273 0 0 if ($o_length + $w_length >= $maxcols)
1277 0 0 if ($w_length >= $maxcols)
1280 0 0 if ($o_line)
1284 0 0 if ($o_line)
1285 0 0 if (scalar @o_lines < $maxrows - 2) { }
1290 0 0 unless open TTY, '>', '/dev/tty'