summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-30 01:01:26 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-30 01:01:26 +0000
commitc811e6163da8915280ba82d37d0a94ee733ab63b (patch)
treea64e373367e8a254dafba3150f24bd763b5036ab /t
parentfc77cbd6c0eaede05389c8646c18a8ec5adb0721 (diff)
downloadperl-c811e6163da8915280ba82d37d0a94ee733ab63b.tar.gz
EBCDIC: t/op/lc.t now passes.
p4raw-id: //depot/perl@14495
Diffstat (limited to 't')
-rw-r--r--t/op/lc.t25
1 files changed, 21 insertions, 4 deletions
diff --git a/t/op/lc.t b/t/op/lc.t
index 091df87dee..1fbb3e1afb 100644
--- a/t/op/lc.t
+++ b/t/op/lc.t
@@ -82,14 +82,31 @@ ok(lc($b) eq "\x{101}\x{101}aa", 'lc');
# \x{149} is LATIN SMALL LETTER N PRECEDED BY APOSTROPHE, its uppercase is
# \x{2BC}\x{E4} or MODIFIER LETTER APOSTROPHE and N.
-ok("\U\x{DF}ab\x{149}cd" eq "SSAB\x{2BC}NCD",
- "multicharacter uppercase");
+# In EBCDIC \x{DF} is LATIN SMALL LETTER Y WITH DIAERESIS,
+# and it's uppercase is \x{178}, LATIN CAPITAL LETTER Y WITH DIAERESIS.
+
+if (ord("A") == 193) { # EBCDIC
+ ok("\U\x{DF}aB\x{149}cD" eq "\x{178}AB\x{2BC}NCD",
+ "multicharacter uppercase");
+} elsif (ord("A") == 65) {
+ ok("\U\x{DF}aB\x{149}cD" eq "SSAB\x{2BC}NCD",
+ "multicharacter uppercase");
+} else {
+ ok(0, "what is your encoding?");
+}
# The \x{DF} is its own lowercase, ditto for \x{149}.
# There are no single character -> multiple characters lowercase mappings.
-ok("\L\x{DF}AB\x{149}CD" eq "\x{DF}ab\x{149}cd",
- "multicharacter lowercase");
+if (ord("A") == 193) { # EBCDIC
+ ok("\LaB\x{149}cD" eq "ab\x{149}cd",
+ "multicharacter lowercase");
+} elsif (ord("A") == 65) {
+ ok("\L\x{DF}aB\x{149}cD" eq "\x{DF}ab\x{149}cd",
+ "multicharacter lowercase");
+} else {
+ ok(0, "what is your encoding?");
+}
# titlecase is used for \u / ucfirst.