blob: a0caf650f1903495bfac779babd82e3ee2df11bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# $Id: enc_data.t,v 2.2 2013/02/18 02:23:56 dankogai Exp $
BEGIN {
require Config; import Config;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
}
unless (find PerlIO::Layer 'perlio') {
print "1..0 # Skip: PerlIO was not built\n";
exit 0;
}
if (ord("A") == 193) {
print "1..0 # encoding pragma does not support EBCDIC platforms\n";
exit(0);
}
if ($] <= 5.008 and !$Config{perl_patchlevel}){
print "1..0 # Skip: Perl 5.8.1 or later required\n";
exit 0;
}
}
use strict;
no warnings "deprecated";
use encoding 'euc-jp';
use Test::More tests => 4;
my @a;
while (<DATA>) {
chomp;
tr/¤¡-¤ó¥¡-¥ó/¥¡-¥ó¤¡-¤ó/;
push @a, $_;
}
is(scalar @a, 3);
is($a[0], "¥³¥ì¥ÏDATA¤Õ¤¡¤¤¤ë¤Ï¤ó¤É¤ë¥Î¤Æ¤¹¤È¥Ç¥¹¡£");
is($a[1], "ÆüËܸ쥬¥Á¥ã¥ó¥ÈÊÑ´¹¥Ç¥¥ë¥«");
is($a[2], "¥É¥¦¥«¥Î¤Æ¤¹¤È¥ò¥·¥Æ¥¤¥Þ¥¹¡£");
__DATA__
¤³¤ì¤ÏDATA¥Õ¥¡¥¤¥ë¥Ï¥ó¥É¥ë¤Î¥Æ¥¹¥È¤Ç¤¹¡£
ÆüËܸ줬¤Á¤ã¤ó¤ÈÊÑ´¹¤Ç¤¤ë¤«
¤É¤¦¤«¤Î¥Æ¥¹¥È¤ò¤·¤Æ¤¤¤Þ¤¹¡£
|