Condition Coverage

blib/lib/Termbox/PP.pm
Criterion Covered Total %
condition 124 311 39.8


and 3 conditions

line !l l&&!r l&&r condition
108 37 0 0 exists $ENV{'TB_OPT_ATTR_W'} && $ENV{'TB_OPT_ATTR_W'} =~ /^(16|32|64)$/
709 59 1 0 $cp >= 55296 and $cp <= 57343
711 32 22 0 $cp >= 127 and $cp < 160
712 0 21 1 $cp >= 160 and $cp <= 255
753 0 0 0 builtin::blessed($tios) and $tios->isa("POSIX::Termios")
857 0 0 7 ref $aref eq "ARRAY" and @$aref == 1
0 0 7 ref $aref eq "ARRAY" and @$aref == 1 and ref $aref->[0] eq "HASH"
871 0 18 0 $strict_type and ref $v ne ref $default
919 0 0 1 $ch =~ /\A\X\z/ && $n > 1
953 0 0 6 ref $a && ref $b
1074 5 0 0 $ow == $w and $oh == $h
1610 0 0 1 $back->{'ch'} =~ /\A\X\z/ and length $back->{'ch'} > 1
1624 1 0 0 $w > 1 and $x >= $Termbox::global->{'front'}{'width'} - ($w - 1)
1630 0 0 1 $back->{'ch'} =~ /\A\X\z/ and length $back->{'ch'} > 1
2101 15 3 14 $i < @c and $c[$i] != 0
2231 0 0 4 ref $back eq "cellbuf" and ref $back->{'cells'} eq "ARRAY"
2362 5 0 0 defined $Termbox::global->{'caps'}[0] and $Termbox::global->{'wfd'} >= 0
2414 1 3 15 $ch != 0 && $w >= 0
2445 10 0 0 $c >= 127462 and $c <= 127487
2852 0 0 0 eval { do { require "sys/ioctl.ph"; 1 } } and ioctl $fh, &TIOCGWINSZ, $sz
2936 0 0 0 $rv != 0 and $rv != -22
2948 0 0 0 $rv != 0 and $rv != -22
3089 0 0 0 $Termbox::global->{'input_mode'} & 1 and length $in == 1
3091 0 0 0 $rv != 0 and $rv != -2
3275 0 2 19 $i < @in and $num_i < 3
3278 0 6 13 $c >= 48 and $c <= 57
3287 0 0 6 $cur_num != -1 and $num_i < 2 && $c == 59 || $num_i == 2 && ($c == 109 || $c == 77)
3373 0 0 1 $node->{'nchildren'} > 0 and length $in <= $depth
3576 2 0 1 $fg == $Termbox::global->{'last_fg'} and $bg == $Termbox::global->{'last_bg'}
3687 0 0 0 ($fg & 16777215) == 0 && ($fg & 2097152) == 0
3688 0 0 0 ($bg & 16777215) == 0 && ($bg & 2097152) == 0
3712 2 0 0 $fg_is_default and $bg_is_default

or 2 conditions

line l !l condition
720 21 0 $cat->[1][$i] // ""
729 17 0 $dig->[1][$i] // ""
736 17 0 $eaw->[1][$i] // ""
2096 18 0 $$utf8_mask[$len - 1] // 127
2292 11 0 $Termbox::global->{'ttyfd_open'} // -1
2444 10 0 $cluster->[$i] // (return -1)
2473 0 0 "POSIX::Termios"->new // (return -15)
2480 0 0 $Termbox::global->{'orig_tios'}->$clone // (return -16)
2637 2 0 length $terminfo // 0
2685 2 0 $Termbox::global->{'caps'} ||= []
2945 0 0 $entry->{'key'} // (next)
2946 0 0 $entry->{'mod'} // (next)
3893 2 0 $fd // -1

or 3 conditions

line l !l&&r !l&&!r condition
708 0 0 60 $cp < 0 or $cp > 1114111
711 4 0 54 $cp < 32 or $cp >= 127 and $cp < 160
712 32 1 21 $cp <= 126 or $cp >= 160 and $cp <= 255
721 0 0 21 $v eq "Cc" or $v eq "Cs"
0 0 21 $v eq "Cc" or $v eq "Cs" or $v eq "Cn"
723 2 1 18 $v eq "Mn" or $v eq "Me"
3 1 17 $v eq "Mn" or $v eq "Me" or $v eq "Cf"
2 0 17 $v eq "Mn" or $v eq "Me" or $v eq "Cf" or $v eq "Zl"
1 0 17 $v eq "Mn" or $v eq "Me" or $v eq "Cf" or $v eq "Zl" or $v eq "Zp"
730 0 0 17 $v eq "Y" or $v eq "Yes"
0 0 17 $v eq "Y" or $v eq "Yes" or $v eq "T"
0 0 17 $v eq "Y" or $v eq "Yes" or $v eq "T" or $v eq "True"
0 0 17 $v eq "Y" or $v eq "Yes" or $v eq "T" or $v eq "True" or $v eq 1
737 12 0 5 $v eq "W" or $v eq "F"
953 0 1 5 not ref $a && ref $b or $a->{'ch'} ne $b->{'ch'}
1 1 4 not ref $a && ref $b or $a->{'ch'} ne $b->{'ch'} or $a->{'fg'} != $b->{'fg'}
2 1 3 not ref $a && ref $b or $a->{'ch'} ne $b->{'ch'} or $a->{'fg'} != $b->{'fg'} or $a->{'bg'} != $b->{'bg'}
1056 0 3 43 $x < 0 or $x >= $c->{'width'}
3 0 43 $x < 0 or $x >= $c->{'width'} or $y < 0
3 0 43 $x < 0 or $x >= $c->{'width'} or $y < 0 or $y >= $c->{'height'}
1484 0 0 0 not defined $ttyfd or $ttyfd < 0
1849 0 1 0 1 == $_ or 2 == $_
1 0 0 1 == $_ or 2 == $_ or 4 == $_
1 0 0 1 == $_ or 2 == $_ or 4 == $_ or 8 == $_
0 0 0 1 == $_ or 2 == $_ or 4 == $_ or 8 == $_ or 5 == $_
2068 7 17 0 $utf8_length->{$c} //= do { my $b = unpack("C", $c); $b < 192 ? 1 : ($b < 224 ? 2 : ($b < 240 ? 3 : ($b < 248 ? 4 : ($b < 252 ? 5 : ($b < 254 ? 6 : 1))))) }
2210 1 0 1 -1 == $_ or -4 == $_
1 0 1 -1 == $_ or -4 == $_ or -10 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_ or -13 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_ or -13 == $_ or -14 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_ or -13 == $_ or -14 == $_ or -15 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_ or -13 == $_ or -14 == $_ or -15 == $_ or -16 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_ or -13 == $_ or -14 == $_ or -15 == $_ or -16 == $_ or -18 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_ or -13 == $_ or -14 == $_ or -15 == $_ or -16 == $_ or -18 == $_ or -19 == $_
0 0 1 -1 == $_ or -4 == $_ or -10 == $_ or -11 == $_ or -12 == $_ or -13 == $_ or -14 == $_ or -15 == $_ or -16 == $_ or -18 == $_ or -19 == $_ or -20 == $_
2351 0 0 4 not defined $str or length $str >= 4096
2457 0 0 8 $vs16 or $zwj
0 0 8 $vs16 or $zwj or $ri >= 2
2621 0 0 4 not defined $nread or $nread != $fsize
2761 0 0 79 $table_offset < 0 or $table_offset >= $table_size
2786 0 1 94 $offset < 0 or $offset + 2 > length $Termbox::global->{'terminfo'}
2879 0 0 1 not defined $write_rv or $write_rv != length $move_and_report
2895 0 0 1 not defined $read_rv or $read_rv < 1
2918 0 0 0 $Termbox::global->{'cap_trie'} //= "captrie"->new
3040 0 0 0 not defined $read_rv or $read_rv < 0
3111 0 0 2 ord $b0 < 32 || ord $b0 == 127
3145 1 0 1 $rv == 0 or $rv == -2
3148 1 0 0 $rv == 0 or $rv == -2
3151 0 0 0 $rv == 0 or $rv == -2
3154 0 0 0 $rv == 0 or $rv == -2
3177 1 0 0 $rv == 0 or $rv == -2
3265 1 1 0 1 == $_ or 2 == $_
3287 4 2 0 $num_i < 2 && $c == 59 || $num_i == 2 && ($c == 109 || $c == 77)
3449 3 0 0 $Termbox::global->{'back'} ||= "cellbuf"->new
3450 3 0 0 $Termbox::global->{'front'} ||= "cellbuf"->new
3675 0 0 0 $fg & 262144 or $bg & 262144
3733 0 0 1 2 == $_ or 4 == $_
0 0 1 2 == $_ or 4 == $_ or 8 == $_
3789 0 0 2 $x < 0 or $y < 0
3817 0 0 0 $Termbox::global->{'last_x'} != $x - 1 or $Termbox::global->{'last_y'} != $y
3894 0 1 1 not defined $wrote or $wrote != $want