X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funi%2Ffold.t;h=789ba670293986c94e38f3dffe6302e024bcf9b1;hb=cf2649810f00335bd657355d81bcc9384a620135;hp=76e16390658d012a5258e14ccf60ba1ee80003a9;hpb=37fca15ea0eeedbb4ad8954058c4cba3243e867c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/uni/fold.t b/t/uni/fold.t index 76e1639..789ba67 100644 --- a/t/uni/fold.t +++ b/t/uni/fold.t @@ -7,18 +7,23 @@ use File::Spec; my $CF = File::Spec->catfile(File::Spec->catdir(File::Spec->updir, "lib", "unicore"), - "CaseFold.txt"); + "CaseFolding.txt"); + +use constant EBCDIC => ord 'A' == 193; if (open(CF, $CF)) { my @CF; while () { - if (/^([0-9A-F]+); ([CFSI]); ((?:[0-9A-F]+)(?: [0-9A-F]+)*); \# (.+)/) { - next if $2 eq 'S'; # we are going for 'F'ull case folding + # Skip S since we are going for 'F'ull case folding + if (/^([0-9A-F]+); ([CFI]); ((?:[0-9A-F]+)(?: [0-9A-F]+)*); \# (.+)/) { + next if EBCDIC && hex $1 < 0x100; push @CF, [$1, $2, $3, $4]; } } + close(CF); + die qq[$0: failed to find casefoldings from "$CF"\n] unless @CF; print "1..", scalar @CF, "\n";