summaryrefslogtreecommitdiff
path: root/cpan/dist/Jcode
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-09-17 04:14:53 +0000
committerfukachan <fukachan>2003-09-17 04:14:53 +0000
commit9ee1a11ec93a89feb054ac0a9b1999d29708dcfe (patch)
treebac6c747a0294145109be9efd81621099d05288b /cpan/dist/Jcode
parent0db4bf5bef9912092c3f5188b9de45b773663de1 (diff)
downloadfml8-9ee1a11ec93a89feb054ac0a9b1999d29708dcfe.tar.gz
fml8-9ee1a11ec93a89feb054ac0a9b1999d29708dcfe.tar.bz2
fml8-9ee1a11ec93a89feb054ac0a9b1999d29708dcfe.zip
Initial revision
Diffstat (limited to 'cpan/dist/Jcode')
-rw-r--r--cpan/dist/Jcode/t/length.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/cpan/dist/Jcode/t/length.t b/cpan/dist/Jcode/t/length.t
new file mode 100644
index 00000000..cca19638
--- /dev/null
+++ b/cpan/dist/Jcode/t/length.t
@@ -0,0 +1,29 @@
+#
+# $Id: length.t,v 0.1 2002/05/03 00:20:47 dankogai Exp $
+#
+# This script is in EUC-JP
+
+use strict;
+
+use Jcode;
+use Test;
+
+eval qq{ use bytes; }; # for sure
+
+my %Tests =
+ (
+ 'あいうえお' => 5,
+ 'あxxx' => 4,
+ 'あ あ ' => 4,
+ 'aaa' => 3,
+ "ホゲ\nホゲ\n" => 6,
+ );
+
+plan tests => (scalar keys %Tests);
+
+while (my($str, $len) = each %Tests) {
+ ok( Jcode->new($str)->jlength, $len );
+}
+
+
+