Update on change #2493.
[p5sagit/p5-mst-13.2.git] / t / op / tr.t
CommitLineData
c8e3bb4c 1# tr.t
2
a5095b95 3chdir 't' if -d 't';
4@INC = "../lib";
5
c8e3bb4c 6print "1..4\n";
7
8$_ = "abcdefghijklmnopqrstuvwxyz";
9
10tr/a-z/A-Z/;
11
12print "not " unless $_ eq "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
13print "ok 1\n";
14
15tr/A-Z/a-z/;
16
17print "not " unless $_ eq "abcdefghijklmnopqrstuvwxyz";
18print "ok 2\n";
19
20tr/b-y/B-Y/;
21
22print "not " unless $_ eq "aBCDEFGHIJKLMNOPQRSTUVWXYz";
23print "ok 3\n";
24
25# In EBCDIC 'I' is \xc9 and 'J' is \0xd1, 'i' is \x89 and 'j' is \x91.
26# Yes, discontinuities. Regardless, the \xca in the below should stay
27# untouched (and not became \x8a).
5e037136 28{
29 no utf8;
30 $_ = "I\xcaJ";
c8e3bb4c 31
5e037136 32 tr/I-J/i-j/;
c8e3bb4c 33
5e037136 34 print "not " unless $_ eq "i\xcaj";
35 print "ok 4\n";
36}
c8e3bb4c 37#