summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
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";
+}