Fix test for overload in given() with smart match after last change
[p5sagit/p5-mst-13.2.git] / t / op / tr.t
index 279470c..9273e09 100755 (executable)
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 117;
+plan tests => 118;
 
 my $Is_EBCDIC = (ord('i') == 0x89 & ord('J') == 0xd1);
 
@@ -461,3 +461,10 @@ is($s, "AxBC", "utf8, DELETE");
     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" );
+}