Branch Coverage

blib/lib/Color/ANSI/Util.pm
Criterion Covered Total %
branch 33 60 55.0


line true false branch
141 2 2 if ($input =~ /^\d+$/) { }
2 0 elsif ($input =~ /^(?:(bold|bright) \s )?(black|red|green|yellow|blue|magenta|cyan|white)$/xi) { }
142 2 0 if ($input >= 0 and $input <= 15) { }
150 0 2 if ($col eq 'black') { }
2 0 elsif ($col eq 'red') { }
0 0 elsif ($col eq 'green') { }
0 0 elsif ($col eq 'yellow') { }
0 0 elsif ($col eq 'blue') { }
0 0 elsif ($col eq 'magenta') { }
0 0 elsif ($col eq 'cyan') { }
0 0 elsif ($col eq 'white') { }
167 1 1 if $bold
177 0 16 unless $rgb =~ /^#?([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})$/
188 1 729 if $sqdist == 0
189 58 671 if (not defined $minsqdist or $minsqdist > $sqdist)
218 0 1 unless exists $ansi256{$input}
284 1 3 $res >= 8 ? :
309 1 1 $res >= 8 ? :
421 7 0 unless (defined $_color_depth)
423 0 7 if (exists $ENV{'NO_COLOR'})
427 1 6 if (defined $ENV{'COLOR'} and not $ENV{'COLOR'})
431 4 2 if (defined $ENV{'COLOR_DEPTH'})
435 0 2 if ($_use_termdetsw)
437 0 0 unless ($@)
443 1 1 if ($ENV{'KONSOLE_DBUS_SERVICE'})
483 2 5 if ($cd >= 16777216) { }
1 4 elsif ($cd >= 256) { }
2 2 elsif ($cd >= 16) { }
525 0 0 if ($cd >= 16777216) { }
0 0 elsif ($cd >= 256) { }