From: Jarkko Hietaniemi Date: Tue, 20 Mar 2001 05:04:25 +0000 (+0000) Subject: tr/// UTF-8 tests for Inaba Hiroto's latest patches. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1ed601ecfa74af5f3658ce7ccdb6a4fecf7ee591;p=p5sagit%2Fp5-mst-13.2.git tr/// UTF-8 tests for Inaba Hiroto's latest patches. p4raw-id: //depot/perl@9257 --- diff --git a/t/op/tr.t b/t/op/tr.t index e114464..e815cf2 100755 --- a/t/op/tr.t +++ b/t/op/tr.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; } -print "1..61\n"; +print "1..65\n"; $_ = "abcdefghijklmnopqrstuvwxyz"; @@ -350,3 +350,20 @@ print "ok 61\n"; } else { for (60..61) { print "ok $_ # Skip: not EBCDIC\n" } } + +($a = "\x{100}") =~ tr/\x00-\xff/X/c; +print "not " unless ord($a) == ord("X"); +print "ok 62\n"; + +($a = "\x{100}") =~ tr/\x00-\xff/X/cs; +print "not " unless ord($a) == ord("X"); +print "ok 63\n"; + +($a = "\x{100}\x{100}") =~ tr/\x{101}-\x{200}//c; +print "not " unless $a eq "\x{100}\x{100}"; +print "ok 64\n"; + +($a = "\x{100}\x{100}") =~ tr/\x{101}-\x{200}//cs; +print "not " unless $a eq "\x{100}"; +print "ok 65\n"; +