Branch Coverage

blib/lib/Term/ANSIColor/Concise.pm
Criterion Covered Total %
branch 66 96 68.7


line true false branch
47 12 57 if ($LINEAR_256) { }
57 0 0 if ($i == 0) { }
0 0 elsif ($base == 6) { }
0 0 elsif ($base == 12) { }
0 0 elsif ($base == 24) { }
67 8 4 if ($code =~ /^([0-5])([0-5])([0-5])$/u) { }
4 0 elsif (my($n) = $code =~ /^L(\d+)/iu) { }
71 0 4 if $n > 25
72 2 2 if ($n == 0 or $n == 25) { }
81 2 10 defined $gray ? :
88 1 23 if ($rx != 0 and $rx != 255 and $rx == $gx and $rx == $bx) { }
89 0 1 if ($LINEAR_GRAY) { }
94 0 0 if ($gray < 0)
105 1 23 defined $gray ? :
111 0 31 if $len == 0 or $len % 3
114 0 31 unless my(@rgb24) = map({hex($_) * 255 / $max;} $rgb =~ /[0-9a-z]{$len}/giu)
115 7 24 if ($RGB24) { }
171 17 97 if ($+{'toggle'}) { }
0 97 elsif ($+{'reset'}) { }
23 74 elsif ($+{'hex'}) { }
5 69 elsif (my $rgb = $+{'rgb'}) { }
12 57 elsif ($+{'c256'}) { }
16 41 elsif ($+{'c16'}) { }
28 13 elsif ($+{'efct'}) { }
9 4 elsif ($+{'csi'}) { }
4 0 elsif ($+{'name'}) { }
0 0 elsif (my $err = $+{'err'}) { }
182 0 5 if grep {$_ > 255;} @rgb
194 9 19 $efct =~ s/^~//u ? :
195 26 2 if (defined(my $n = $numbers{$efct}))
201 3 6 if ($+{'csi_abbr'}) { }
213 3 1 if (my $rgb = $colornames->hex($+{'name'})) { }
226 3 110 if ($SPLIT_ANSI)
228 2 1 if (defined $index)
282 0 59 if (my $seq = $other_sequence{$name})
285 0 59 unless (my $c = $csi_terminator{$name})
289 0 53 if ($name eq "SGR" and @_ == 1 and $_[0] == 0)
301 11 48 if (ref $item eq 'ARRAY') { }
318 2 6 $start eq '' ? :
319 2 4 if ($start =~ /(.*)(\e\[[0;]*K)(.*)/u) { }
321 0 2 if ($3) { }
327 0 4 if ($NO_RESET_EL) { }
351 0 39 ref $spec eq 'ARRAY' ? :
356 0 39 if @_
364 0 39 if (ref $color eq 'CODE') { }
0 39 elsif (&blessed($color) and $color->can('call')) { }
18 21 elsif ($NO_COLOR) { }
376 0 21 if ($el) { }