blob: e610b0d10e0545dec8d996e5220f93f965cda6d4 (
plain) (
blame)
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
46
47
48
49
|
# $Id: enc_data.t,v 2.5 2016/11/29 23:29:23 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 # Skip: encoding pragma does not support EBCDIC platforms\n";
exit(0);
}
if ($] >= 5.025 and !$Config{usecperl}) {
print "1..0 # Skip: encoding pragma not supported in Perl 5.26\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�ե�����ϥ�ɥ�Υƥ��ȤǤ���
���ܸ줬�������Ѵ��Ǥ��뤫
�ɤ����Υƥ��ȤƤ��ޤ���
|