summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-01-10 03:17:54 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-10 03:17:54 +0000
commita1874b66a2e595b5c1284f57f900fb844c8d8fa3 (patch)
tree3556cffdf6cd3f4583b1ef28b2cb62b0b299d10d
parent16ec844ddf6ed30b884deee1be32522f7b107b77 (diff)
downloadperl-a1874b66a2e595b5c1284f57f900fb844c8d8fa3.tar.gz
Test cases for #8385 (from Simon's "torture.pl")
p4raw-id: //depot/perl@8386
-rwxr-xr-xt/op/tr.t16
1 files changed, 15 insertions, 1 deletions
diff --git a/t/op/tr.t b/t/op/tr.t
index 8d6dd980c0..6a4e1aa5f5 100755
--- a/t/op/tr.t
+++ b/t/op/tr.t
@@ -5,7 +5,7 @@ BEGIN {
@INC = '../lib';
}
-print "1..46\n";
+print "1..49\n";
$_ = "abcdefghijklmnopqrstuvwxyz";
@@ -273,3 +273,17 @@ print "ok 45\n";
print "not " unless $a eq v196.172.301.196.172.172;
print "ok 46\n";
+# Tricky cases by Simon Cozens.
+
+($a = v196.172.200) =~ tr/\x{12c}/a/;
+print "not " unless sprintf("%vd", $a) eq '196.172.200';
+print "ok 47\n";
+
+($a = v196.172.200) =~ tr/\x{12c}/\x{12c}/;
+print "not " unless sprintf("%vd", $a) eq '196.172.200';
+print "ok 48\n";
+
+($a = v196.172.200) =~ tr/\x{12c}//d;
+print "not " unless sprintf("%vd", $a) eq '196.172.200';
+print "ok 49\n";
+