diff options
author | Dan Kogai <dankogai@dan.co.jp> | 2003-05-18 09:45:35 +0900 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-05-17 16:39:19 +0000 |
commit | 1485817ebf8dde6b1eba1bd4d8bf7c6e2e9fb14b (patch) | |
tree | 2bba0473a06f71a84173c1614ad1cecd19a80ac9 /ext/Encode/t | |
parent | fde91635d459dc9b5c5563809bb62a4fc882e73c (diff) | |
download | perl-1485817ebf8dde6b1eba1bd4d8bf7c6e2e9fb14b.tar.gz |
[Encode] UTF-7 Support
Message-Id: <99C4504E-887E-11D7-840A-000393AE4244@dan.co.jp>
p4raw-id: //depot/perl@19548
Diffstat (limited to 'ext/Encode/t')
-rw-r--r-- | ext/Encode/t/Unicode.t | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ext/Encode/t/Unicode.t b/ext/Encode/t/Unicode.t index fb0ca1aad5..50e5ba0ac5 100644 --- a/ext/Encode/t/Unicode.t +++ b/ext/Encode/t/Unicode.t @@ -18,7 +18,7 @@ BEGIN { use strict; #use Test::More 'no_plan'; -use Test::More tests => 30; +use Test::More tests => 37; use Encode qw(encode decode); # @@ -103,6 +103,24 @@ SKIP: { } }; +# +# CJKT vs. UTF-7 +# +use File::Spec; +use File::Basename; + +my $dir = dirname(__FILE__); +opendir my $dh, $dir or die "$dir:$!"; +my @file = sort grep {/\.utf$/o} readdir $dh; +closedir $dh; +for my $file (@file){ + my $path = File::Spec->catfile($dir, $file); + open my $fh, '<:utf8', $path or die "$path:$!"; + my $content = join('' => <$fh>); + close $fh; + is(decode("UTF-7", encode("UTF-7", $content)), $content, + "UTF-7 RT:$file"); +} 1; __END__ |