require './test.pl';
}
-plan tests => 117;
+plan tests => 119;
my $Is_EBCDIC = (ord('i') == 0x89 & ord('J') == 0xd1);
is($c, "\x20\x30\x40\x50\x60", "tr/\\x00-\\x1f//d");
}
+($s) = keys %{{pie => 3}};
+my $wasro = Internals::SvREADONLY($s);
+{
+ $wasro or local $TODO = "didn't have a COW";
+ $s =~ tr/i//;
+ ok( Internals::SvREADONLY($s), "count-only tr doesn't deCOW COWs" );
+}
+
+# [ RT #61520 ]
+#
+# under threads, unicode tr within a cloned closure would SEGV or assert
+# fail, since the pointer in the pad to the swash was getting zeroed out
+# in the proto-CV
+
+{
+ my $x = "\x{142}";
+ sub {
+ $x =~ tr[\x{142}][\x{143}];
+ }->();
+ is($x,"\x{143}", "utf8 + closure");
+}
+
+