p4raw-id: //depot/perl@11014
print "ok $test\n";
$test++;
+my $ordA = ord('A');
+
$_ = "a\x{100}b";
if (/(.)(\C)(\C)(.)/) {
print "ok 232\n";
} else {
print "not ok 233\n";
}
- if ($2 eq "\xC4") {
- print "ok 234\n";
- } else {
- print "not ok 234\n";
- }
- if ($3 eq "\x80") {
- print "ok 235\n";
+ if ($ordA == 65) { # ASCII (or equivalent), should be UTF-8
+ if ($2 eq "\xC4") {
+ print "ok 234\n";
+ } else {
+ print "not ok 234\n";
+ }
+ if ($3 eq "\x80") {
+ print "ok 235\n";
+ } else {
+ print "not ok 235\n";
+ }
+ } elsif ($ordA == 193) { # EBCDIC (or equivalent), should be UTF-EBCDIC
+ if ($2 eq "\x8C") {
+ print "ok 234\n";
+ } else {
+ print "not ok 234\n";
+ }
+ if ($3 eq "\x41") {
+ print "ok 235\n";
+ } else {
+ print "not ok 235\n";
+ }
} else {
- print "not ok 235\n";
+ for (234..235) {
+ print "not ok $_ # ord('A') == $ordA\n";
+ }
}
if ($4 eq "b") {
print "ok 236\n";
if (/(\C)/g) {
print "ok 237\n";
# currently \C are still tagged as UTF-8
- if ($1 eq "\xC4") {
- print "ok 238\n";
+ if ($ordA == 65) {
+ if ($1 eq "\xC4") {
+ print "ok 238\n";
+ } else {
+ print "not ok 238\n";
+ }
+ } elsif ($ordA == 193) {
+ if ($1 eq "\x8C") {
+ print "ok 238\n";
+ } else {
+ print "not ok 238\n";
+ }
} else {
- print "not ok 238\n";
+ print "not ok 238 # ord('A') == $ordA\n";
}
} else {
for (237..238) {
if (/(\C)/g) {
print "ok 239\n";
# currently \C are still tagged as UTF-8
- if ($1 eq "\x80") {
- print "ok 240\n";
+ if ($ordA == 65) {
+ if ($1 eq "\x80") {
+ print "ok 240\n";
+ } else {
+ print "not ok 240\n";
+ }
+ } elsif ($ordA == 193) {
+ if ($1 eq "\x41") {
+ print "ok 240\n";
+ } else {
+ print "not ok 240\n";
+ }
} else {
- print "not ok 240\n";
+ print "not ok 240 # ord('A') == $ordA\n";
}
} else {
for (239..240) {