diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-09 13:50:57 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-03-09 13:50:57 +0000 |
commit | 52d2e0f43e4c92315f9f6c027571388b7bc65ff5 (patch) | |
tree | 9d3a5ecb667da98fcf89f05c2b945974ed5cf5ed /ext/Encode | |
parent | 5460b889677b9f352c882dbcd4ad4470b8281664 (diff) | |
download | perl-52d2e0f43e4c92315f9f6c027571388b7bc65ff5.tar.gz |
From Inaba Hiroto: DATA wasn't properly utf8ed
under 'use encoding'.
p4raw-id: //depot/perl@18865
Diffstat (limited to 'ext/Encode')
-rw-r--r-- | ext/Encode/MANIFEST | 1 | ||||
-rw-r--r-- | ext/Encode/t/enc_data.t | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/ext/Encode/MANIFEST b/ext/Encode/MANIFEST index 2705308a64..0eb87ed1ec 100644 --- a/ext/Encode/MANIFEST +++ b/ext/Encode/MANIFEST @@ -62,6 +62,7 @@ t/big5-eten.enc test data t/big5-eten.utf test data t/big5-hkscs.enc test data t/big5-hkscs.utf test data +t/enc_data.t test script for utf8 DATA t/enc_eucjp.t test script t/enc_module.enc test data for t/enc_module.t t/enc_module.t test script diff --git a/ext/Encode/t/enc_data.t b/ext/Encode/t/enc_data.t new file mode 100644 index 0000000000..f47d083204 --- /dev/null +++ b/ext/Encode/t/enc_data.t @@ -0,0 +1,24 @@ +use encoding 'euc-jp'; +use Test::More tests => 1; + +my @a; + +while (<DATA>) { + chomp; + tr/ぁ-んァ-ン/ァ-ンぁ-ん/; + push @a, $_; +} + +SKIP: { + skip("pre-5.8.1 does not do utf8 DATA", 1) if $] < 5.008001; + ok(@a == 3 && + $a[0] eq "コレハDATAふぁいるはんどるノてすとデス。" && + $a[1] eq "日本語ガチャント変換デキルカ" && + $a[2] eq "ドウカノてすとヲシテイマス。", + "utf8 (euc-jp) DATA") +} + +__DATA__ +これはDATAファイルハンドルのテストです。 +日本語がちゃんと変換できるか +どうかのテストをしています。 |