summaryrefslogtreecommitdiff
path: root/ext/Unicode
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-23 20:05:10 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-23 20:05:10 +0000
commit7ac4cfc1a831c8fe810302b2ae5c11520fbd6a1a (patch)
tree8a426d5cbf6bcb88a19e9f6a3e00539bc5baaff4 /ext/Unicode
parent70c20b6960b34354cfb3e545fcd058f4811c32bc (diff)
downloadperl-7ac4cfc1a831c8fe810302b2ae5c11520fbd6a1a.tar.gz
Retract #14571: there may be a better solution than
tweaking the test. p4raw-id: //depot/perl@14846
Diffstat (limited to 'ext/Unicode')
-rw-r--r--ext/Unicode/Normalize/t/norm.t47
1 files changed, 6 insertions, 41 deletions
diff --git a/ext/Unicode/Normalize/t/norm.t b/ext/Unicode/Normalize/t/norm.t
index b75b295617..970e6712f7 100644
--- a/ext/Unicode/Normalize/t/norm.t
+++ b/ext/Unicode/Normalize/t/norm.t
@@ -24,24 +24,9 @@ sub hexNFD {
unpack 'U*', normalize 'NFD', pack 'U*', map hex(), split ' ', shift;
}
-my $ordA = ord("A");
-my $ASCII = $ordA == 0x41;
-my $EBCDIC = $ordA == 0xc1;
-
-if ($ASCII) {
- ok(hexNFC("0061 0315 0300 05AE 05C4 0062"), "00E0 05AE 05C4 0315 0062");
- ok(hexNFC("00E0 05AE 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
- ok(hexNFC("0061 05AE 0300 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
-} elsif ($EBCDIC) {
- # A WITH GRAVE is 0044 in EBCDIC, not 00E0
- # SMALL LATIN B is 0082 in EBCDIC, not 0062
- ok(hexNFC("0061 0315 0300 05AE 05C4 0062"), "0044 05AE 05C4 0315 0082");
- ok(hexNFC("00E0 05AE 05C4 0315 0062"), "0044 05AE 05C4 0315 0082");
- ok(hexNFC("0061 05AE 0300 05C4 0315 0062"), "0044 05AE 05C4 0315 0082");
-} else {
- skip("Neither ASCII nor EBCDIC based") for 1..3;
-}
-
+ok(hexNFC("0061 0315 0300 05AE 05C4 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("00E0 05AE 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
+ok(hexNFC("0061 05AE 0300 05C4 0315 0062"), "00E0 05AE 05C4 0315 0062");
ok(hexNFC("0045 0304 0300 AC00 11A8"), "1E14 AC01");
ok(hexNFC("1100 1161 1100 1173 11AF"), "AC00 AE00");
ok(hexNFC("1100 0300 1161 1173 11AF"), "1100 0300 1161 1173 11AF");
@@ -49,30 +34,10 @@ ok(hexNFC("1100 0300 1161 1173 11AF"), "1100 0300 1161 1173 11AF");
ok(hexNFD("0061 0315 0300 05AE 05C4 0062"), "0061 05AE 0300 05C4 0315 0062");
ok(hexNFD("00E0 05AE 05C4 0315 0062"), "0061 05AE 0300 05C4 0315 0062");
ok(hexNFD("0061 05AE 0300 05C4 0315 0062"), "0061 05AE 0300 05C4 0315 0062");
-
-if ($ASCII) {
- ok(hexNFC("0061 05C4 0315 0300 05AE 0062"), "0061 05AE 05C4 0300 0315 0062");
- ok(hexNFC("0061 05AE 05C4 0300 0315 0062"), "0061 05AE 05C4 0300 0315 0062");
-} elsif ($EBCDIC) {
- # SMALL LATIN A is 0081 in EBCDIC, not 0061
- # SMALL LATIN B is 0082 in EBCDIC, not 0062
- ok(hexNFC("0061 05C4 0315 0300 05AE 0062"), "0081 05AE 05C4 0300 0315 0082");
- ok(hexNFC("0061 05AE 05C4 0300 0315 0062"), "0081 05AE 05C4 0300 0315 0082");
-} else {
- skip("Neither ASCII nor EBCDIC based") for 1..2;
-}
-
+ok(hexNFC("0061 05C4 0315 0300 05AE 0062"), "0061 05AE 05C4 0300 0315 0062");
+ok(hexNFC("0061 05AE 05C4 0300 0315 0062"), "0061 05AE 05C4 0300 0315 0062");
ok(hexNFD("0061 05C4 0315 0300 05AE 0062"), "0061 05AE 05C4 0300 0315 0062");
ok(hexNFD("0061 05AE 05C4 0300 0315 0062"), "0061 05AE 05C4 0300 0315 0062");
-
-if ($ASCII) {
- ok(hexNFC("0000 0041 0000 0000"), "0000 0041 0000 0000");
-} elsif ($EBCDIC) {
- # CAPITAL LATIN A is 00C1 in EBCDIC, not 0041
- ok(hexNFC("0000 0041 0000 0000"), "0000 00C1 0000 0000");
-} else {
- skip("Neither ASCII nor EBCDIC based");
-}
-
+ok(hexNFC("0000 0041 0000 0000"), "0000 0041 0000 0000");
ok(hexNFD("0000 0041 0000 0000"), "0000 0041 0000 0000");