This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Testcases for a #7383,#7385 related bug.
authorNicholas Clark <nick@ccl4.org>
Sat, 21 Oct 2000 15:04:51 +0000 (16:04 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 21 Oct 2000 14:37:49 +0000 (14:37 +0000)
Subject: PATCH Re: [ID 20001020.006] "$2$utf8" == modification of read-only-variable
Message-ID: <20001021150451.A51566@plum.flirble.org>

p4raw-id: //depot/perl@7391

t/pragma/utf8.t

index 75f607d..7224a74 100755 (executable)
@@ -10,7 +10,7 @@ BEGIN {
     }
 }
 
-print "1..101\n";
+print "1..103\n";
 
 my $test = 1;
 
@@ -543,4 +543,19 @@ sub nok_bytes {
 
     print "ok $test\n";
     $test++;
+
+    *pi = \undef;
+    # This bug existed earlier than the $2 bug, but is fixed with the same
+    # patch. Without the fix this will also croak:
+    # Modification of a read-only value attempted at ...
+    "$pi\x{1234}";
+
+    print "ok $test\n";
+    $test++;
+
+    # For symmetry with the above.
+    "\x{1234}$pi";
+
+    print "ok $test\n";
+    $test++;
 }