This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Restore a portion of reverted commits
[perl5.git] / t / lib / warnings / utf8
index af04d4c..2bd59f6 100644 (file)
@@ -99,12 +99,11 @@ Operation "uc" returns its argument for non-Unicode code point 0x110000 at - lin
 Operation "uc" returns its argument for UTF-16 surrogate U+D800 at - line 5.
 ########
 use warnings 'utf8';
-no warnings 'deprecated'; # This is above IV_MAX on 32 bit machines
-my $big_nonUnicode = uc(chr(0x8000_0000));
+my $big_nonUnicode = uc(chr(0x7FFF_FFFF));
 no warnings 'non_unicode';
-my $big_nonUnicode = uc(chr(0x8000_0000));
+my $big_nonUnicode = uc(chr(0x7FFF_FFFF));
 EXPECT
-Operation "uc" returns its argument for non-Unicode code point 0x80000000 at - line 3.
+Operation "uc" returns its argument for non-Unicode code point 0x7FFFFFFF at - line 2.
 ########
 use warnings 'utf8';
 my $d7ff  = lc pack("U", 0xD7FF);
@@ -783,3 +782,16 @@ BEGIN{
 {};$^H=eval'2**400'}Â
 EXPECT
 Malformed UTF-8 character: \xc2\x0a (unexpected non-continuation byte 0x0a, immediately after start byte 0xc2; need 2 bytes, got 1) at - line 11.
+########
+# NAME  [perl #131646]
+BEGIN{
+    if (ord('A') == 193) {
+        print "SKIPPED\n# ebcdic platforms generates different Malformed UTF-8 warnings.";
+        exit 0;
+    }
+}
+no warnings;
+use warnings 'utf8';
+for(uc 0..t){0~~pack"UXp>",exp}
+EXPECT
+Malformed UTF-8 character: \xc2\x00 (unexpected non-continuation byte 0x00, immediately after start byte 0xc2; need 2 bytes, got 1)  in smart match at - line 9.