Branch Coverage

blib/lib/Text/Convert/PETSCII.pm
Criterion Covered Total %
branch 94 98 95.9


line true false branch
80 2 20 if ($c != $code)
83 3 19 if ($code >= 65 and $code <= 90) { }
13 12 elsif ($code >= 97 and $code <= 122) { }
111 3 20 if ($c != $code)
114 12 11 if ($code >= 65 and $code <= 90) { }
8 3 elsif ($code >= 97 and $code <= 122) { }
0 3 elsif ($code == 127) { }
149 11 31 if ($screen_code & 128) { }
150 1 10 unless ($reverse_flag)
158 1 30 if ($reverse_flag)
167 12 30 if ($petscii_byte >= 0 and $petscii_byte < 32) { }
9 21 elsif ($petscii_byte >= 64 and $petscii_byte < 96) { }
3 36 elsif ($petscii_byte >= 96 and $petscii_byte < 128) { }
207 1 58 if ($petscii_byte == 18)
213 1 57 if ($petscii_byte == 146)
219 1 56 if ($petscii_byte >= 192 and $petscii_byte < 224) { }
0 56 elsif ($petscii_byte >= 224 and $petscii_byte < 255) { }
0 56 elsif ($petscii_byte == 255) { }
2 102 elsif ($petscii_byte >= 149 and $petscii_byte < 156) { }
236 11 46 if ($petscii_byte >= 0 and $petscii_byte < 32 or $petscii_byte >= 128 and $petscii_byte < 160)
243 12 34 if ($screen_code >= 64 and $screen_code < 96) { }
12 22 elsif ($screen_code >= 96 and $screen_code < 128) { }
4 36 elsif ($screen_code >= 160 and $screen_code < 192) { }
276 0 9 unless (defined $petscii_write_mode)
284 9 27 if (defined $petscii_write_mode)
285 1 8 unless (grep {$petscii_write_mode eq $_;} 'shifted', 'unshifted')
309 21 12 if (&_is_integer($chr_petscii)) { }
10 2 elsif (&_is_string($chr_petscii)) { }
310 2 19 if ($chr_petscii < 32 or $chr_petscii > 255 or $chr_petscii >= 128 and $chr_petscii <= 159) { }
318 1 9 if (length $chr_petscii == 0) { }
1 8 elsif (length $chr_petscii > 1) { }
334 27 6 if (defined $screen_code)
335 8 19 _petscii_write_mode() eq 'shifted' ? :
339 541 1187 $font_line & 128 ? :
340 541 1187 if ($font_pixel) { }
368 3 9 unless is_valid_petscii_string($text_string)
370 1 8 if length $text_string == 0
372 4 4 unless ($text_string =~ /^[^\x20-\x7f\xa0-\xff]*$/g)
392 2 22 unless defined $text_string
393 2 20 if ref $text_string
395 2 18 if length $text_string == 0
397 16 2 unless ($text_string =~ /^[^\x00-\xff]*$/g)
407 1 28 if ($num_petscii < 32 or $num_petscii > 255 or $num_petscii >= 128 and $num_petscii <= 159)
411 10 18 if ($num_petscii >= 64 and $num_petscii <= 95) { }
4 14 elsif ($num_petscii >= 96 and $num_petscii <= 127) { }
2 12 elsif ($num_petscii >= 160 and $num_petscii <= 191) { }
4 8 elsif ($num_petscii >= 192 and $num_petscii <= 223) { }
2 6 elsif ($num_petscii >= 224 and $num_petscii <= 254) { }
1 5 elsif ($num_petscii == 255) { }