Branch Coverage

blib/lib/Term/ANSIColor/Concise.pm
Criterion Covered Total %
branch 67 100 67.0


line true false branch
48 12 57 if ($LINEAR_256) { }
58 0 0 if ($i == 0) { }
0 0 elsif ($base == 6) { }
0 0 elsif ($base == 12) { }
0 0 elsif ($base == 24) { }
68 8 4 if ($code =~ /^([0-5])([0-5])([0-5])$/u) { }
4 0 elsif (my($n) = $code =~ /^L(\d+)/iu) { }
72 0 4 if $n > 25
73 2 2 if ($n == 0 or $n == 25) { }
82 2 10 defined $gray ? :
89 1 23 if ($rx != 0 and $rx != 255 and $rx == $gx and $rx == $bx) { }
90 0 1 if ($LINEAR_GRAY) { }
95 0 0 if ($gray < 0)
106 1 23 defined $gray ? :
112 0 31 if $len == 0 or $len % 3
115 0 31 unless my(@rgb24) = map({hex($_) * 255 / $max;} $rgb =~ /[0-9a-z]{$len}/giu)
116 7 24 if ($RGB24) { }
172 17 103 if ($+{'toggle'}) { }
0 103 elsif ($+{'reset'}) { }
23 80 elsif ($+{'hex'}) { }
5 75 elsif (my $rgb = $+{'rgb'}) { }
12 63 elsif ($+{'c256'}) { }
16 47 elsif ($+{'c16'}) { }
34 13 elsif ($+{'efct'}) { }
9 4 elsif ($+{'csi'}) { }
4 0 elsif ($+{'name'}) { }
0 0 elsif (my $err = $+{'err'}) { }
183 0 5 if grep {$_ > 255;} @rgb
195 9 25 $efct =~ s/^~//u ? :
196 32 2 if (defined(my $n = $numbers{$efct}))
202 3 6 if ($+{'csi_abbr'}) { }
214 3 1 if (my $rgb = $colornames->hex($+{'name'})) { }
227 3 116 if ($SPLIT_ANSI)
229 2 1 if (defined $index)
283 0 65 if (my $seq = $other_sequence{$name})
286 0 65 unless (my $c = $csi_terminator{$name})
290 0 59 if ($name eq "SGR" and @_ == 1 and $_[0] == 0)
302 11 54 if (ref $item eq 'ARRAY') { }
319 2 7 $start eq '' ? :
320 2 5 if ($start =~ /(.*)(\e\[[0;]*K)(.*)/u) { }
322 0 2 if ($3) { }
328 0 5 if ($NO_RESET_EL) { }
352 0 36 ref $spec eq 'ARRAY' ? :
357 0 36 if @_
365 0 36 if (ref $color eq 'CODE') { }
0 36 elsif (&blessed($color) and $color->can('call')) { }
18 18 elsif ($NO_COLOR) { }
0 18 elsif ($NO_CUMULATIVE) { }
377 0 0 if ($el) { }
387 0 18 if ($el) { }