This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/loc_tools.pl: Fix some bugs in locales_enabled()
[perl5.git] / lib / bytes.t
index 6ac18df..4e50ff3 100644 (file)
@@ -33,20 +33,20 @@ utf8::encode(my $c2_utf8 = $c2);
 
 {
     use bytes;
-    if (ord('A') == 193) { # EBCDIC?
+    if ($::IS_EBCDIC) { # EBCDIC?
        is(ord($c), 0x8c, "ord under use bytes looks at the 1st byte");
     } else {
        is(ord($c), 0xc4, "ord under use bytes looks at the 1st byte");
     }
     is(length($c), 2, "length under use bytes looks at bytes");
     is(bytes::length($c), 2, "bytes::length under use bytes looks at bytes");
-    if (ord('A') == 193) { # EBCDIC?
+    if ($::IS_EBCDIC) { # EBCDIC?
        is(bytes::ord($c), 0x8c, "bytes::ord under use bytes looks at the 1st byte");
     } else {
        is(bytes::ord($c), 0xc4, "bytes::ord under use bytes looks at the 1st byte");
     }
     # In z/OS \x41,\x8c are the codepoints corresponding to \x80,\xc4 respectively under ASCII platform
-    if (ord('A') == 193) { # EBCDIC?
+    if ($::IS_EBCDIC) { # EBCDIC?
         is(bytes::substr($c, 0, 1), "\x8c", "bytes::substr under use bytes looks at bytes");
         is(bytes::index($c, "\x41"), 1, "bytes::index under use bytes looks at bytes");
         is(bytes::rindex($c, "\x8c"), 0, "bytes::rindex under use bytes looks at bytes");
@@ -62,7 +62,6 @@ utf8::encode(my $c2_utf8 = $c2);
     # and if there's other tests for lc/uc under bytes I didn't find them
     is(lc($c2), $c2_utf8, "lc under use bytes returns bytes");
     is(uc($c2), $c2_utf8, "uc under use bytes returns bytes");
-    local $TODO = "[perl #117355] [lu]cfirst don't respect 'use bytes'";
     is(lcfirst($c2), $c2_utf8, "lcfirst under use bytes returns bytes");
     is(ucfirst($c2), $c2_utf8, "unfirst under use bytes returns bytes");
 }