Branch Coverage

blib/lib/Color/ANSI/Util.pm
Criterion Covered Total %
branch 32 58 55.1


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
181 1 729 if $diff == 0
182 50 679 if (not defined $smallest_diff or $smallest_diff > $diff)
210 0 1 unless exists $ansi256{$input}
276 1 3 $res >= 8 ? :
301 1 1 $res >= 8 ? :
413 7 0 unless (defined $_color_depth)
415 0 7 if (exists $ENV{'NO_COLOR'})
419 1 6 if (defined $ENV{'COLOR'} and not $ENV{'COLOR'})
423 4 2 if (defined $ENV{'COLOR_DEPTH'})
427 0 2 if ($_use_termdetsw)
429 0 0 unless ($@)
435 1 1 if ($ENV{'KONSOLE_DBUS_SERVICE'})
475 2 5 if ($cd >= 16777216) { }
1 4 elsif ($cd >= 256) { }
2 2 elsif ($cd >= 16) { }
517 0 0 if ($cd >= 16777216) { }
0 0 elsif ($cd >= 256) { }