Branch Coverage

blib/lib/Unicode/Collate.pm
Criterion Covered Total %
branch 286 316 90.5


line true false branch
7 0 138 unless (65 == unpack('U', 'A'))
147 9 814 if (exists $hash{'alternate'})
148 1 8 if (exists $hash{'variable'}) { }
155 884 0 if (exists $ChangeOK{$k}) { }
0 0 elsif (exists $ChangeNG{$k}) { }
164 8 815 wantarray ? :
170 0 1059 unless 1 <= $level
173 0 1059 unless $level <= 4
205 0 1043 unless $self->{'derivCode'} = $DerivCode{$self->{'UCA_Version'}}
211 0 1043 unless exists $VariableOK{$self->{'variable'}}
213 919 124 if (not defined $self->{'backwards'}) { }
11 113 elsif (not ref $self->{'backwards'}) { }
230 2 1041 unless defined $self->{'rearrange'}
232 0 1043 unless ref $self->{'rearrange'}
237 13 1030 if (@{$self->{'rearrange'};})
243 40 1003 if (defined $self->{'normalization'})
245 0 40 if $@
249 32 8 if ($self->{'normalization'} =~ /^(?:NF)D\z/) { }
7 1 elsif ($self->{'normalization'} ne 'prenormalized') { }
258 0 7 if $@
270 127 93 if (not exists $self->{'table'} || defined $self->{'rewrite'} || defined $self->{'undefName'} || defined $self->{'ignoreName'} || defined $self->{'undefChar'} || defined $self->{'ignoreChar'}) { }
280 6 214 if ($self->{'suppress'} and @{$self->{'suppress'};})
285 128 92 unless exists $self->{'table'}
286 172 48 if defined $self->{'table'}
288 151 69 if ($self->{'entry'})
299 213 7 unless exists $self->{'overrideHangul'}
301 187 33 unless exists $self->{'overrideCJK'}
303 9 211 unless exists $self->{'normalization'}
306 218 2 unless exists $self->{'rearrange'}
308 213 7 unless exists $self->{'backwards'}
310 220 0 unless exists $self->{'long_contraction'}
322 172 512 if ($line =~ /^version\s*(\S*)/) { }
0 512 elsif ($line =~ /^variable\s+(\S*)/) { }
0 512 elsif ($line =~ /^alternate\s+(\S*)/) { }
0 512 elsif ($line =~ /^backwards\s+(\S*)/) { }
0 512 elsif ($line =~ /^forwards\s+(\S*)/) { }
0 512 elsif ($line =~ /^rearrange\s+(.*)/) { }
346 127 45 if ($self->{'__useXS'})
349 0 119888 if $line =~ /^\s*#/
351 635 119253 if ($line =~ s/^\s*\@//) { }
364 45 45 if open $fh, $f
367 0 45 unless (defined $f)
373 809 70303 if $line =~ /^\s*#/
375 49 70254 if ($line =~ s/^\s*\@//) { }
395 34764 184426 if (defined $self->{'rewrite'})
399 101 219089 unless $line =~ /^\s*[0-9A-Fa-f]/
402 99831 119258 if $line =~ s/[#%]\s*(.*)//
404 424 218665 if defined $self->{'undefName'} and $name =~ /$self->{'undefName'}/
408 0 218665 unless $k
412 0 218665 unless @uv
414 10 4699 if @uv > 1 and $self->{'suppressHash'} and not $tailoring and exists $self->{'suppressHash'}{$uv[0]}
417 1690 216965 if (defined $self->{'undefChar'} or defined $self->{'ignoreChar'})
422 4 1686 if defined $self->{'undefChar'} and $ele =~ /$self->{'undefChar'}/
426 4 1682 if defined $self->{'ignoreChar'} and $ele =~ /$self->{'ignoreChar'}/
431 424 218227 if defined $self->{'ignoreName'} and $name =~ /$self->{'ignoreName'}/
439 13437 7051 if $wt[0] or $wt[1] or $wt[2]
448 5281 213370 $is_L3_ignorable ? :
451 127526 91125 if (@uv > 1)
452 10875 116651 if (not $self->{'maxlength'}{$uv[0]} or $self->{'maxlength'}{$uv[0]} < @uv)
481 8 59145 if ref $prep
482 421 58732 if ref $norm
512 132 59260 if ($reH and not $wLen)
514 13 167 if (exists $$reH{$src[$i]} and $i + 1 < @src)
523 75 84619 if ($vers <= 20 and _isIllegal($src[$i])) { }
1470 83149 elsif ($ver9) { }
527 337 1133 exists $$map{$src[$i]} ? :
26 1444 if exists $$map{$src[$i]} ? @{$$map{$src[$i]};} == 0 : $uXS && _ignorable_simple($src[$i])
536 197 73021 unless (defined $jcps)
537 15 182 if ($wLen and @buf)
546 13226 59795 if (exists $max->{$jcps})
552 26 13272 unless defined $src[$p]
555 10756 2516 if (exists $map->{$temp_jcps})
569 165 13061 if ($self->{'normalization'})
577 16 252 unless defined $src[$p]
579 33 219 unless $curCC
582 64 155 if ($preCC != $curCC and exists $$map{$jcps . $tail}) { }
589 100 119 unless $long
591 79 40 if ($preCC_uc != $curCC and exists $$map{$jcps_uc . $tail} || exists $$cont{$jcps_uc . $tail}) { }
601 39 126 if (@out_uc and exists $map->{$jcps_uc}) { }
611 33130 39891 exists $map->{$jcps} ? :
334 61878 if (exists $map->{$jcps} ? @{$map->{$jcps};} == 0 : $uXS && !($jcps =~ /;/) && _ignorable_simple($jcps))
613 94 240 if ($wLen and @buf)
619 1976 70711 $wLen ? :
632 1343 11080 if (ref $r) { }
8814 2266 elsif (defined $r) { }
637 4 2262 if 1114111 < $u
654 0 72483 unless defined $u
655 132 122 if $u eq 65535 and $self->{'highestFFFF'}
656 22 47 if $u eq 65534 and $self->{'minimalFFFE'}
657 6 62303 if not $u =~ /;/ and 1114111 < $u and not $out
660 32644 39685 if (exists $map->{$u}) { }
16698 22987 elsif ($uXS and _exists_simple($u)) { }
138 22849 elsif (44032 <= $u and $u <= 55203) { }
72 22777 elsif ($out and 1114111 < $u) { }
668 23 115 if ($hang) { }
10 105 elsif (not defined $hang) { }
676 45 60 if (@decH == 2) { }
678 4 41 if exists $map->{$contract}
680 7 53 if (exists $$max{$decH[0]})
682 1 6 if (exists $map->{$contract}) { }
686 5 1 if exists $map->{$contract}
691 2 58 if (@decH == 3 and exists $$max{$decH[1]})
693 2 0 if exists $map->{$contract}
698 100 36 $uXS && _exists_simple($_) ? :
121 136 exists $map->{$_} ? :
708 11755 11022 if ($cjk and _isUIdeo($u, $vers)) { }
96 10926 elsif ($vers == 8 and defined $cjk and _isUIdeo($u, 0)) { }
735 100 59053 if ($term) { }
741 3 218 if ($preHST and not $curHST or $preHST =~ /L\z/ and $curHST =~ /^T/ or $preHST =~ /V\z/ and $curHST =~ /^L/ or $preHST =~ /T\z/ and $curHST =~ /^[LV]/)
750 66 34 if $preHST
759 8726 50427 if ($iden or $vers >= 26 and $lev == 4)
761 46 8680 if $iden
796 0 2216 unless defined $wt
798 1877 339 grep(($$wt[$_ - 1] != 0), 1 .. $lv) ? :
817 38 1373 if @{$source->[$g];} != @{$substr->[$g];}
821 711 1283 if $source->[$g][$w][$v] != $substr->[$g][$w][$v]
839 12 127 if $self->{'preprocess'}
841 4 123 if $self->{'normCode'}
847 46 77 @_ ? :
848 1 122 if $pos < 0
855 6 117 unless (@$subE)
856 0 0 $len <= $pos ? :
6 0 $pos <= 0 ? :
857 3 1 wantarray ? :
2 4 $glob ? :
861 1 0 wantarray ? :
1 116 if $len < $pos
863 4 112 $pos ? :
864 1 0 wantarray ? :
1 115 unless @$strE
875 384 32 if ($v2i)
876 15 369 if ($var) { }
52 317 elsif (not $wt[0]) { }
880 0 52 if $last_is_variable
887 52 364 if (@subWt and not $var and not $wt[0]) { }
351 13 elsif ($to_be_pushed) { }
888 41 11 if $to_be_pushed
909 1733 67 if ($v2i)
910 316 1417 if ($var) { }
95 1322 elsif (not $wt[0]) { }
914 4 91 if $last_is_variable
921 114 1686 if (@strWt and not $var and not $wt[0]) { }
1420 266 elsif ($to_be_pushed) { }
922 61 53 if $to_be_pushed
926 5 1415 $found_base ? :
927 5 1415 if $found_base
938 144 752 if ($iniPos[0] != -1 and $finPos[$#subWt] != -1 and &_eqArray(\@strWt, \@subWt, $lev))
943 90 54 if ($glob) { }
951 35 19 wantarray ? :
961 15 8 wantarray ? :
38 23 $glob ? :
972 22 5 if (my($pos, $len) = $self->index($_[0], $_[1])) { }
974 18 4 wantarray ? :
1001 2 3 ref $_[2] eq 'CODE' ? :
1003 3 2 if (my($pos, $len) = $self->index($_[0], $_[1])) { }
1004 1 2 if ($code) { }
1023 29 5 ref $_[2] eq 'CODE' ? :
1028 78 20 if ($code) { }