Branch Coverage

lib/UTF8/R2.pm
Criterion Covered Total %
branch 367 424 86.5


line true false branch
18 0 60 if $] < "5.006"
60 0 60 if (defined $_[0] and $_[0] =~ /\A [0-9] /msx)
61 0 0 if ($_[0] ne $UTF8::R2::VERSION)
71 17 8 if ($_ eq '*mb') { }
5 3 elsif ($_ eq '%mb') { }
3 0 elsif (defined $utf8_codepoint{$_}) { }
141 24 12 @_ ? :
142 40 12 if (my(@x) = /\G$x/g)
153 80 8 @_ ? :
182 2 0 @_ ? :
195 8 0 @_ ? :
197 2 6 if ($getc =~ /\A [\x00-\x7F\x80-\xC1\xF5-\xFF] \z/msx) { }
2 4 elsif ($getc =~ /\A [\xC2-\xDF] \z/msx) { }
2 2 elsif ($getc =~ /\A [\xE0-\xEF] \z/msx) { }
2 0 elsif ($getc =~ /\A [\xF0-\xF4] \z/msx) { }
218 8 8 if (@_ == 3) { }
224 8 8 if ($index == -1) { }
235 8 8 if (@_ == 3) { }
246 5 1 @_ ? :
248 53 56 unless {"A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "Q", "q", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "W", "w", "X", "x", "Y", "y", "Z", "z"}->{$_}
255 1 1 @_ ? :
256 2 0 if (/\A($x)(.*)\z/s) { }
267 24 8 @_ ? :
274 15 15 @_ ? :
276 30 0 if (/\A($x)/)
291 11414 189112 if (do { CORE::length $a == 1 }) { }
22058 167054 elsif (CORE::length $a == 2) { }
107566 59488 elsif (CORE::length $a == 3) { }
59488 0 elsif (CORE::length $a == 4) { }
293 374 11040 if (do { CORE::length $b == 1 }) { }
960 10080 elsif (CORE::length $b == 2) { }
5088 4992 elsif (CORE::length $b == 3) { }
4992 0 elsif (CORE::length $b == 4) { }
296 374 0 $a[1] <= $b[1] ? :
302 476 484 194 < $b[1] ? :
309 2988 2100 128 < $b[2] ? :
4160 928 224 < $b[1] ? :
318 2464 2528 128 < $b[3] ? :
3168 1824 128 < $b[2] ? :
3552 1440 240 < $b[1] ? :
329 1226 20832 if (do { CORE::length $b == 2 }) { }
10464 10368 elsif (CORE::length $b == 3) { }
10368 0 elsif (CORE::length $b == 4) { }
331 858 368 $a[1] < 223 ? :
335 858 368 194 < $b[1] ? :
343 6144 4320 128 < $b[2] ? :
8560 1904 224 < $b[1] ? :
5184 5280 $a[1] < 223 ? :
352 5120 5248 128 < $b[3] ? :
6576 3792 128 < $b[2] ? :
7392 2976 240 < $b[1] ? :
5120 5248 $a[1] < 223 ? :
363 34606 72960 if (do { CORE::length $b == 3 }) { }
72960 0 elsif (CORE::length $b == 4) { }
365 33386 1220 $a[1] < 239 ? :
20894 13712 $a[2] < 191 ? :
370 19006 15600 128 < $b[2] ? :
33380 1226 224 < $b[1] ? :
379 36096 36864 128 < $b[3] ? :
46176 26784 128 < $b[2] ? :
52416 20544 240 < $b[1] ? :
59520 13440 $a[1] < 239 ? :
42368 30592 $a[2] < 191 ? :
390 59488 0 if (do { CORE::length $b == 4 })
392 55144 4344 $a[1] < 244 ? :
34388 25100 $a[2] < 191 ? :
31456 28032 $a[3] < 191 ? :
398 31456 28032 128 < $b[3] ? :
34388 25100 128 < $b[2] ? :
55144 4344 240 < $b[1] ? :
417 209731 0 if (($modifiers) = $_[0] =~ /\A \( \? \^? (.*?) : /x)
429 208402 1053223 if (my($negative, $class) = $before =~ /\A \[ (\^?) ((?>\\$x|$x)+?) \] \z/x) { }
498 1052725 elsif ($before eq '.') { }
18 1052707 elsif ($before eq '\\B') { }
33 1052674 elsif ($before eq '\\D') { }
24 1052650 elsif ($before eq '\\H') { }
18 1052632 elsif ($before eq '\\N') { }
39 1052593 elsif ($before eq '\\R') { }
24 1052569 elsif ($before eq '\\S') { }
24 1052545 elsif ($before eq '\\V') { }
192 1052353 elsif ($before eq '\\W') { }
18 1052335 elsif ($before eq '\\b') { }
33 1052302 elsif ($before eq '\\d') { }
24 1052278 elsif ($before eq '\\h') { }
24 1052254 elsif ($before eq '\\s') { }
24 1052230 elsif ($before eq '\\v') { }
192 1052038 elsif ($before eq '\\w') { }
210172 841866 elsif ($before =~ /\A[?+*{]\z/) { }
18 841848 elsif ($before =~ /\A \\x \{ ([0123456789ABCDEFabcdef]+) \} \z/x) { }
438 200526 7924 if ($i < $#classmate and $classmate[$i + 1] eq '-') { }
439 18 200508 $classmate[$i + 0] =~ /\A \\x \{ ([0123456789ABCDEFabcdef]+) \} \z/x ? :
440 18 200508 $classmate[$i + 2] =~ /\A \\x \{ ([0123456789ABCDEFabcdef]+) \} \z/x ? :
449 18 7906 if ($classmate =~ /\A \\x \{ ([0123456789ABCDEFabcdef]+) \} \z/x) { }
33 7873 elsif ($classmate eq '\\D') { }
24 7849 elsif ($classmate eq '\\H') { }
24 7825 elsif ($classmate eq '\\S') { }
24 7801 elsif ($classmate eq '\\V') { }
192 7609 elsif ($classmate eq '\\W') { }
3 7606 elsif ($classmate eq '\\b') { }
33 7573 elsif ($classmate eq '\\d') { }
24 7549 elsif ($classmate eq '\\h') { }
24 7525 elsif ($classmate eq '\\s') { }
24 7501 elsif ($classmate eq '\\v') { }
192 7309 elsif ($classmate eq '\\w') { }
256 7053 elsif ($classmate eq '[:alnum:]') { }
256 6797 elsif ($classmate eq '[:alpha:]') { }
256 6541 elsif ($classmate eq '[:ascii:]') { }
256 6285 elsif ($classmate eq '[:blank:]') { }
256 6029 elsif ($classmate eq '[:cntrl:]') { }
256 5773 elsif ($classmate eq '[:digit:]') { }
256 5517 elsif ($classmate eq '[:graph:]') { }
256 5261 elsif ($classmate eq '[:lower:]') { }
256 5005 elsif ($classmate eq '[:print:]') { }
256 4749 elsif ($classmate eq '[:punct:]') { }
256 4493 elsif ($classmate eq '[:space:]') { }
256 4237 elsif ($classmate eq '[:upper:]') { }
256 3981 elsif ($classmate eq '[:word:]') { }
256 3725 elsif ($classmate eq '[:xdigit:]') { }
256 3469 elsif ($classmate eq '[:^alnum:]') { }
256 3213 elsif ($classmate eq '[:^alpha:]') { }
256 2957 elsif ($classmate eq '[:^ascii:]') { }
256 2701 elsif ($classmate eq '[:^blank:]') { }
256 2445 elsif ($classmate eq '[:^cntrl:]') { }
256 2189 elsif ($classmate eq '[:^digit:]') { }
256 1933 elsif ($classmate eq '[:^graph:]') { }
256 1677 elsif ($classmate eq '[:^lower:]') { }
256 1421 elsif ($classmate eq '[:^print:]') { }
256 1165 elsif ($classmate eq '[:^punct:]') { }
256 909 elsif ($classmate eq '[:^space:]') { }
256 653 elsif ($classmate eq '[:^upper:]') { }
256 397 elsif ($classmate eq '[:^word:]') { }
256 141 elsif ($classmate eq '[:^xdigit:]') { }
21 120 elsif (CORE::length $classmate == 1) { }
508 79449 128953 if ($negative eq '^') { }
0 128953 elsif ($] =~ /\A5\.006/) { }
509 0 0 @sbcs && !@xbcs ? :
79449 0 !@sbcs && @xbcs ? :
0 79449 @sbcs && @xbcs ? :
518 0 0 @sbcs && !@xbcs ? :
0 0 !@sbcs && @xbcs ? :
0 0 @sbcs && @xbcs ? :
527 3905 0 @sbcs && !@xbcs ? :
125048 3905 !@sbcs && @xbcs ? :
0 128953 @sbcs && @xbcs ? :
536 3 495 $modifiers =~ /s/ ? :
554 57 210115 if (do { $after[-1] =~ /\A \\c [\x00-\xFF] \z/x }) { }
171 209944 elsif ($after[-1] =~ /\A \\ [\x00-\xFF] \z/x) { }
209827 117 elsif ($after[-1] =~ /\A [\x00-\xFF] \z/x) { }
114 3 elsif ($after[-1] =~ / [\x00-\xFF] [)}\]] \z/x) { }
583 10 0 @_ ? :
586 0 10 if (/^[0-9]/) { }
587 0 0 if ($] < $_) { }
601 0 10 if ($file =~ s[::][/]g or not $file =~ m([\./\\]))
604 2 8 if (exists $INC{$file})
606 2 0 if $INC{$file}
610 8 0 if (-f $prefix_file)
623 0 8 if ($@) { }
0 8 elsif (not $result) { }
645 4 16 if (wantarray) { }
655 8 8 @_ ? :
669 8 8 if (@_ == 3) { }
675 8 8 if ($rindex == -1) { }
686 8 8 if (@_ == 3) { }
697 76 36 if (defined $_[0] and $_[0] eq '' || $_[0] =~ /\A \( \? \^? [-a-z]* : \) \z/x) { }
24 12 elsif (@_ == 3) { }
12 0 elsif (@_ == 2) { }
0 0 elsif (@_ == 1) { }
698 60 16 defined $_[1] ? :
699 24 12 if (defined $_[2] and $_[2] > 0 and scalar @x > $_[2])
702 52 24 if (wantarray) { }
706 0 24 if ($] < "5.012")
707 0 0 if $^W
729 4 112 if ($_[1] < -1 * scalar(@x) or 1 * scalar(@x) < $_[1])
16 32 $_[1] > 0 ? :
16 48 $_[1] < 0 ? :
48 0 $_[2] > 0 ? :
16 48 $_[2] < 0 ? :
8 0 $_[1] > 0 ? :
8 8 $_[1] < 0 ? :
32 80 if (@_ == 4) { }
64 16 elsif (@_ == 3) { }
785 8 1876 if ($i + 1 < $#hyphened and $hyphened[$i + 1] eq '-' and 1) { }
789 0 8 $hyphened[$i + 0] eq '\\-' ? :
790 0 8 $hyphened[$i + 2] eq '\\-' ? :
791 0 8 if (do { not $hyphened[$i + 0] =~ /\A [\x00-\x7F] \z/msx }) { }
0 8 elsif (not $hyphened[$i + 2] =~ /\A [\x00-\x7F] \z/msx) { }
0 8 elsif ($hyphened[$i + 0] gt $hyphened[$i + 2]) { }
807 0 1876 if ($hyphened[$i] eq '\\-') { }
825 340 90 defined $_[3] ? :
831 938 88 unless (exists $tr{$search[$i]})
834 774 164 if (defined $replacement[$i] and $replacement[$i] ne '') { }
92 72 elsif (exists $modifier{'d'}) { }
56 16 elsif (defined $replacement[-1] and $replacement[-1] ne '') { }
859 156 274 if (exists $modifier{'c'}) { }
862 72 84 if (exists $modifier{'s'}) { }
867 360 288 if (exists $tr{$x}) { }
874 216 72 if (exists $modifier{'d'}) { }
72 0 elsif (defined $replacement[-1]) { }
880 0 72 if (defined $last_transliterated and $replacement[-1] eq $last_transliterated) { }
898 396 144 if (exists $tr{$x}) { }
904 36 108 if (exists $modifier{'d'}) { }
108 0 elsif (defined $replacement[-1]) { }
921 144 130 if (exists $modifier{'s'}) { }
924 712 296 if (exists $tr{$x}) { }
927 156 556 if ($tr{$x} eq '') { }
280 276 elsif (defined $last_transliterated and $tr{$x} eq $last_transliterated) { }
950 710 260 if (exists $tr{$x}) { }
962 104 326 if (exists $modifier{'r'}) { }
976 3 1 @_ ? :
978 52 54 unless {"a", "A", "b", "B", "c", "C", "d", "D", "e", "E", "f", "F", "g", "G", "h", "H", "i", "I", "j", "J", "k", "K", "l", "L", "m", "M", "n", "N", "o", "O", "p", "P", "q", "Q", "r", "R", "s", "S", "t", "T", "u", "U", "v", "V", "w", "W", "x", "X", "y", "Y", "z", "Z"}->{$_}
985 1 1 @_ ? :
986 2 0 if (/\A($x)(.*)\z/s) { }