BEGIN { $| = 1; print "1..15\n"; }
END {print "not ok 1\n" unless $loaded;}
use ShiftJIS::String qw(strtr);
$^W = 1;
$loaded = 1;
print "ok 1\n";
#####
%hash = strtr(
'µ¸¯³â@¢Íɵݢé@¹Ý̱¦',
" -±â-ë", "", "h");
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq '¢=>2:¦=>1:¯=>1:±=>1:â=>1:é=>1'
? "ok" : "not ok", " 2\n";
$hash = strtr(
'µ¸¯³â@¢Íɵݢé@¹Ý̱¦',
" -±â-ë", "", "h");
$join = join ':', map "$_=>$$hash{$_}", sort keys %$hash;
print $join eq '¢=>2:¦=>1:¯=>1:±=>1:â=>1:é=>1'
? "ok" : "not ok", " 3\n";
%hash = strtr(
"Caesar Aether Goethe Europaeae Oestrone Uenoeki",
"aeoeueAeOeUe",
"äööÄÖÜ",
"h",
"[aouAOU]e",
"&[aouAOU]uml;");
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq "Ae=>1:Oe=>1:Ue=>1:ae=>3:oe=>2"
? "ok" : "not ok", " 4\n";
%hash = strtr('ú{êÌJ^Ji', '-ñ@-¦-ß', '', 'h');
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq 'Ì=>1:J=>2:^=>1:i=>1'
? "ok" : "not ok", " 5\n";
$str = 'ú{êÌJ^Ji';
%hash = strtr(\$str, '-ñ@-', '@--ñ', 'h');
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq 'Ì=>1:J=>2:^=>1:i=>1'
? "ok" : "not ok", " 6\n";
print $str eq 'ú{êm©½©È'
? "ok" : "not ok", " 7\n";
$str = 'ú{êÌJ^JiÌ{';
%hash = strtr(\$str, '-ñ@-', '', 'cdh');
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq 'ê=>1:ú=>1:{=>2'
? "ok" : "not ok", " 8\n";
print $str eq 'ÌJ^JiÌ'
? "ok" : "not ok", " 9\n";
$str = 'ú{êÌJ^JiÌ{';
%hash = strtr(\$str, '-ñ@-', '', 'dh');
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq 'Ì=>2:J=>2:^=>1:i=>1'
? "ok" : "not ok", " 10\n";
print $str eq 'ú{ê{'
? "ok" : "not ok", " 11\n";
$str = 'ú{êÌJ^JiÌ{';
%hash = strtr(\$str, '-ñ@-', '', 'ch');
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq 'ê=>1:ú=>1:{=>2'
? "ok" : "not ok", " 12\n";
print $str eq 'ú{êÌJ^JiÌ{'
? "ok" : "not ok", " 13\n";
$str = '{Ìú{êÌJ^JiÌ{';
%hash = strtr(\$str, '-ñ@-', '!', 'ch');
$join = join ':', map "$_=>$hash{$_}", sort keys %hash;
print $join eq 'ê=>1:=>1:ú=>1:{=>3'
? "ok" : "not ok", " 14\n";
print $str eq '!!Ì!!!ÌJ^JiÌ!'
? "ok" : "not ok", " 15\n";
1;
__END__