Branch Coverage

blib/lib/Term/Completion.pm
Criterion Covered Total %
branch 9 160 5.6


line true false branch
51 4 0 !($^O =~ /interix/i) ? :
54 1 2 if (/^:posix$/) { }
0 2 elsif (/^:stty$/) { }
1 1 elsif (/^:readkey$/) { }
0 1 elsif (/^:DEFAULT$/ or not /^:/) { }
71 0 3 if ($@)
89 0 2 if (ref $class)
107 0 0 unless defined $prompt
110 0 0 if (ref $_[0] or $_[0] =~ /^\*/) { }
140 0 0 if (defined $$this{'helptext'} and not defined $$this{'help'})
154 0 0 if (exists $SIG{'WINCH'})
158 0 0 if ($$this{'_sig_winch'})
174 0 0 if (/^\x1b([^\[])/ or /^\x1b\[(?:[A-Z]|\d+~)(.)/)
181 0 0 if ($_ =~ /$$this{'tab'}/)
182 0 0 if ($tab_pressed++)
187 0 0 if (@match == 0) { }
192 0 0 if (@match) { }
0 0 elsif ($$this{'delim'}) { }
206 0 0 if ($add)
221 0 0 if ($_ =~ /$$this{'list'}/)
227 0 0 if (defined $$this{'help'})
228 0 0 if ($_ =~ /$$this{'help'}/)
229 0 0 if (defined $$this{'helptext'})
238 0 0 if ($_ =~ /$$this{'kill'}/)
239 0 0 if ($r)
251 0 0 if ($_ =~ /$$this{'erase'}/)
252 0 0 if ($r)
262 0 0 if ($_ =~ /$$this{'wipe'}/)
263 0 0 if ($r)
265 0 0 if defined $$this{'sep'}
266 0 0 if defined $$this{'delim'}
267 0 0 if (length $sep and $return =~ s/((?:^|[$sep$sep]+)[^$sep$sep]*[$sep$sep]*)$//s)
278 0 0 if ($_ =~ /$$this{'up'}/)
279 0 0 if (not defined $choice_num) { }
281 0 0 if (defined $choice_cycle[$#choice_cycle])
285 0 0 if ($choice_num <= 0)
291 0 0 if (not defined $choice_num) { }
303 0 0 if ($_ =~ /$$this{'down'}/)
304 0 0 if (not defined $choice_num) { }
306 0 0 if (defined $choice_cycle[0])
310 0 0 if (++$choice_num >= @choice_cycle)
315 0 0 if (not defined $choice_num) { }
327 0 0 if (ord $_ >= 32)
335 0 0 unless ($_ =~ /^\x1b/)
347 0 0 defined $key ? :
348 0 0 unless (defined $match)
364 0 0 if (not $$this{'validate'}) { }
0 0 elsif (ref $$this{'validate'}) { }
371 0 0 unless (defined $match)
383 0 0 if ($val eq 'lowercase')
387 0 0 if ($val eq 'uppercase')
391 0 0 if ($val eq 'match_one')
395 0 0 if (@matches == 1) { }
0 0 elsif (@matches == 0) { }
402 0 0 if (@matches == 1)
414 0 0 if ($val eq 'nonempty')
415 0 0 unless (length $return)
422 0 0 if ($val eq 'nonblank')
423 0 0 unless (length $return and $return =~ /\S/)
430 0 0 if ($val eq 'fromchoices')
431 0 0 if (length $return and not grep(($return eq $_), $this->get_choices('')))
438 0 0 if ($val eq 'numeric')
439 0 0 unless ($return =~ /^-?(?:\.\d+|\d+\.?\d*)$/)
446 0 0 if ($val eq 'integer')
447 0 0 unless ($return =~ /^-?\d+$/)
454 0 0 if ($val eq 'nonzero')
455 0 0 if ($return == 0)
462 0 0 if ($val eq 'positive')
463 0 0 unless ($return > 0)
480 0 0 if $bell
503 0 0 unless (@choices)
506 0 0 if (defined $$this{'columns'} and $$this{'columns'} == 0)
517 0 0 if (exists $SIG{'WINCH'})
521 0 0 if ($$this{'_sig_winch'})
528 0 0 unless $COLUMNS and $ROWS
532 0 0 $maxwidth >= $COLUMNS ? :
547 0 0 if ($ROWS and ++$page_lines == $ROWS)
552 0 0 if ($c =~ /$$this{'quit'}/) { }
0 0 elsif ($$this{'_winch'}) { }
0 0 elsif ($c =~ /$$this{'enter'}/) { }