This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
And that same fool forgot to add the not-really-needed "fuzzy" versions
[perl5.git] / lib / utf8.t
index 90035e5..576d90e 100644 (file)
@@ -37,7 +37,7 @@ no utf8; # Ironic, no?
 #
 #
 
-plan tests => 144;
+plan tests => 145;
 
 {
     # bug id 20001009.001
@@ -415,3 +415,13 @@ SKIP: {
     like($@, qr/^Modification of a read-only value attempted/,
         "utf8::encode should refuse to touch read-only values");
 }
+
+{
+    my $a = "456\xb6";
+    utf8::upgrade($a);
+
+    my $b = "123456\xb6";
+    $b =~ s/^...//;
+    utf8::upgrade($b);
+    is($b, $a, "utf8::upgrade OffsetOK");
+}