diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-15 03:05:59 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-10-15 03:05:59 +0000 |
commit | 1e2878e610af032604518a9feca8663968d7369a (patch) | |
tree | f01568df3211cb82ccb3a9c86a575e5dd9179fa0 | |
parent | e4f185bfe2360f2f09795c7415a8bcf98d1dd0ce (diff) | |
parent | c8e3bb4c8218524992d6c15718b8c60041841fa3 (diff) | |
download | perl-1e2878e610af032604518a9feca8663968d7369a.tar.gz |
integrate mainline to get tr.t
p4raw-id: //depot/cfgperl@1970
-rwxr-xr-x | t/op/tr.t | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/t/op/tr.t b/t/op/tr.t new file mode 100755 index 0000000000..3503c3cf12 --- /dev/null +++ b/t/op/tr.t @@ -0,0 +1,33 @@ +# tr.t + +print "1..4\n"; + +$_ = "abcdefghijklmnopqrstuvwxyz"; + +tr/a-z/A-Z/; + +print "not " unless $_ eq "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; +print "ok 1\n"; + +tr/A-Z/a-z/; + +print "not " unless $_ eq "abcdefghijklmnopqrstuvwxyz"; +print "ok 2\n"; + +tr/b-y/B-Y/; + +print "not " unless $_ eq "aBCDEFGHIJKLMNOPQRSTUVWXYz"; +print "ok 3\n"; + +# In EBCDIC 'I' is \xc9 and 'J' is \0xd1, 'i' is \x89 and 'j' is \x91. +# Yes, discontinuities. Regardless, the \xca in the below should stay +# untouched (and not became \x8a). + +$_ = "I\xcaJ"; + +tr/I-J/i-j/; + +print "not " unless $_ eq "i\xcaj"; +print "ok 4\n"; + +# |