summaryrefslogtreecommitdiff
path: root/t/op/tr.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/tr.t')
-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";
+