The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# encoding: EUCJP
# This file is encoded in EUC-JP.
die "This file is not encoded in EUC-JP.\n" if q{¤¢} ne "\xa4\xa2";

use Char;
print "1..5\n";

my $__FILE__ = __FILE__;

#
# tr
#
$y = "¤¢¤¤¤¦¤¨¤ª";
$y =~ tr/¤¢-¤¦//cd;
if ($y ne "¤¢¤¤¤¦") {
    print "not ok - 1 $^X $__FILE__\n";
}
else {
    print "ok - 1 $^X $__FILE__\n";
}

$y = "¤¢¤¤¤¦¤¨¤ª";
$y =~ tr/¤¢-¤¦/¤«-¤¯/;
if ($y ne "¤«¤­¤¯¤¨¤ª") {
    print "not ok - $^X 2 $__FILE__\n";
}
else {
    print "ok - 2 $^X $__FILE__\n";
}

$y = 'abcabcabc';
$y =~ tr/a-c/d-f/;
if ($y ne 'defdefdef') {
    print "not ok - 3 $^X $__FILE__\n";
}
else {
    print "ok - 3 $^X $__FILE__\n";
}

$y = 'abc';
$y =~ tr/abc/def/;
if ($y ne 'def') {
    print "not ok - 4 $^X $__FILE__\n";
}
else {
    print "ok - 4 $^X $__FILE__\n";
}

$y = 'abcabcabc';
$y =~ tr/abc/def/;
if ($y ne 'defdefdef') {
    print "not ok - 5 $^X $__FILE__\n";
}
else {
    print "ok - 5 $^X $__FILE__\n";
}

__END__