Branch Coverage

blib/lib/Convert/Color/XTerm.pm
Criterion Covered Total %
branch 17 24 70.8


line true false branch
84 0 1 if (eval { do { require Convert::Color::X11; 'Convert::Color::X11'->colors } }) { }
117 540 108 $_ ? :
157 4 4 if ($val =~ /^(\d+)%$/u) { }
4 0 elsif ($val =~ /^(\d+)$/u) { }
158 0 4 unless $1 <= 100
162 0 4 unless $1 <= $max
173 0 6 unless @_ == 1
176 1 5 unless @color
178 2 4 if ($_[0] =~ /^grey\((.*)\)$/u) { }
2 2 elsif ($_[0] =~ /^rgb\((.*),(.*),(.*)\)$/u) { }
2 0 elsif ($_[0] =~ /^(\d+)$/u) { }
191 0 2 unless $index >= 0 and $index < 256