summaryrefslogtreecommitdiff
path: root/cpan/dist/Jcode/t/tr.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/dist/Jcode/t/tr.t')
-rw-r--r--cpan/dist/Jcode/t/tr.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpan/dist/Jcode/t/tr.t b/cpan/dist/Jcode/t/tr.t
index 497cae92..1a420305 100644
--- a/cpan/dist/Jcode/t/tr.t
+++ b/cpan/dist/Jcode/t/tr.t
@@ -30,6 +30,10 @@ my $katakana; $file = "t/zenkaku.euc"; open F, $file or die "$file:$!";
read F, $katakana, -s $file;
profile(sprintf("prep: katakana ok %d\n", ++$n));
+my $stripped; $file = "t/stripped.euc"; open F, $file or die "$file:$!";
+read F, $stripped, -s $file;
+profile(sprintf("prep: stripped ok %d\n", ++$n));
+
#print jcode($katakana)->tr('A-Za-zァ-ンァ-ン','a-zA-Zぁ-んァ-ン');
#__END__
@@ -57,6 +61,14 @@ for my $icode (keys %code2str){
}
}
+# test tr($s,'','d');
+
+my $ok = (jcode($hiragana)->tr('ぁ-ん','','d')->euc eq $stripped) ?
+"ok" : "not ok";
+
+profile(sprintf("H2Z: %s -> %s %s %d\n",
+ 'ぁ-ん', "\'\' \'d\'", $ok, ++$n ));
+
print 1, "..", $NTESTS, "\n";
for my $TEST (@TESTS){
print $TEST;