summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-12-02 20:52:32 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-02 20:01:24 +0000
commit2233f375aa37a706e02f773eded0886e392aa503 (patch)
tree6ded52299120629b0e81838a098c90f860143752 /t/op
parent117c9db16c535ffa926174c60f260279c800cc8b (diff)
downloadperl-2233f375aa37a706e02f773eded0886e392aa503.tar.gz
Shared hash keys
Message-ID: <20011202205232.U21702@plum.flirble.org> p4raw-id: //depot/perl@13430
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/tr.t10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/op/tr.t b/t/op/tr.t
index 124c08a94e..5cd800f89e 100755
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -5,7 +5,7 @@ BEGIN {
@INC = '../lib';
}
-print "1..70\n";
+print "1..71\n";
$_ = "abcdefghijklmnopqrstuvwxyz";
@@ -390,4 +390,10 @@ print "ok 69\n";
print "not " unless $a eq "XZY";
print "ok 70\n";
-
+# pp_trans needs to unshare shared hash keys
+# Used to fail with "Modification of a read-only value attempted"
+%a = (N=>1);
+foreach (keys %a) {
+ tr/N/n/;
+ print +($_ eq 'n' ? '' : "not ") . "ok 71\n";
+}