Branch Coverage

blib/lib/String/Tagged/IRC.pm
Criterion Covered Total %
branch 61 80 76.2


line true false branch
92 1 2 if $colcode =~ /^#([0-9a-f]{6})/i
96 0 2 if $colcode =~ /^#([0-9a-f])([0-9a-f])([0-9a-f])/i
100 2 0 if $colcode =~ /^(\d\d?)/ and $1 < 16
115 3 0 if $idx >= 0 and $idx < @termcolours
131 16 19 if ($text =~ s/^([\x00-\x1f])//) { }
134 2 14 if ($ctrl eq 'B') { }
0 14 elsif ($ctrl eq 'U' or $ctrl eq '_') { }
2 12 elsif ($ctrl eq 'R' or $ctrl eq ']') { }
0 12 elsif ($ctrl eq 'V') { }
0 12 elsif ($ctrl eq 'O') { }
4 8 elsif ($ctrl eq 'C') { }
8 0 elsif ($ctrl eq 'D') { }
135 1 1 $format{'b'} ? :
138 0 0 $format{'u'} ? :
141 1 1 $format{'i'} ? :
144 0 0 $format{'rv'} ? :
152 1 3 if ($text =~ s/^($colourre),($colourre)//) { }
1 2 elsif ($text =~ s/^($colourre)//) { }
165 0 8 if ($text =~ s/^b//) { }
2 6 elsif ($text =~ s/^c//) { }
2 4 elsif ($text =~ s/^d//) { }
2 2 elsif ($text =~ s/^g//) { }
166 0 0 $format{'u'} ? :
169 1 1 $format{'b'} ? :
172 1 1 $format{'i'} ? :
180 2 0 if ($fg > 0)
183 1 1 if ($bg > 0)
197 0 2 unless $piece =~ s[^(.*?)(?
202 2 0 if length $pre
212 18 1 if length $piece
255 2 7 if !$formats{'b'} != !$tags{'b'}
256 0 9 if !$formats{'u'} != !$tags{'u'}
257 1 8 if !$formats{'i'} != !$tags{'i'}
258 0 9 if !$formats{'rv'} != !$tags{'rv'}
260 1 8 $tags{'fg'} ? :
261 1 8 $tags{'bg'} ? :
263 3 6 if (($fg // '') ne ($formats{'fg'} // '') or ($bg // '') ne ($formats{'bg'} // ''))
264 1 2 if (defined $bg) { }
1 1 elsif (defined $fg) { }
287 1 2 if defined $formats{'fg'} or defined $formats{'bg'}