like($@, qr/^Invalid range "m-d" in transliteration operator/,
'reversed range check');
-eval '$1 =~ tr/x/y/';
-like($@, qr/^Modification of a read-only value attempted/,
- 'cannot update read-only var');
-
'abcdef' =~ /(bcd)/;
is(eval '$1 =~ tr/abcd//', 3, 'explicit read-only count');
is($@, '', ' no error');
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" );
+}