BEGIN { $| = 1; print "1..11\n"; }
END {print "not ok 1\n" unless $loaded;}
use ShiftJIS::String qw(:all);
$^W = 1;
$loaded = 1;
print "ok 1\n";
#####
$L82 = '(?:\x82[\x40-\xfc])';
$L83 = '(?:\x83[\x40-\xfc])';
"`abACEGI" =~ /($L82+)($L83+)/;
print "`ab" eq $1 && "ACEGI" eq $2
? "ok" : "not ok", " 2\n";
print length($1) == 3 && length($2) == 5
? "ok" : "not ok", " 3\n";
print strrev($1) eq "ba`" && strrev($2) eq "IGECA"
? "ok" : "not ok", " 4\n";
print "ab" eq substr($1,1,2) && "EGI" eq substr($2,-3)
? "ok" : "not ok", " 5\n";
print "ABC" eq strtr($1,'`-y','A-Z')
&& "ACEGI" eq strtr($2,'`-y','A-Z')
? "ok" : "not ok", " 6\n";
print "`ab" eq strtr($1,'A-',' -ñ')
&& " ¢¤¦¨" eq strtr($2,'A-',' -ñ')
? "ok" : "not ok", " 7\n";
print "`ab" eq $1 && "ACEGI" eq $2
? "ok" : "not ok", " 8\n";
$str = "`abACEGIwxynqtwz";
$str =~ s/($L82+)($L83+)/
strtr($1,'`-y','A-Z'). strtr($2,'A-',' -ñ')
/ge;
print $str eq "ABC ¢¤¦¨XYZÍÐÓÖÙ"
? "ok" : "not ok", " 9\n";
$str =~ s/($L82+)/strrev(substr($1,1,3))/ge;
print $str eq "ABC¦¤¢XYZÖÓÐ"
? "ok" : "not ok", " 10\n";
$str =~ s/($L82+)/length($1)/ge;
print $str eq "ABC3XYZ3"
? "ok" : "not ok", " 11\n";
1;
__END__