Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t: Fix indirect syntax #176

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion t/Aliases.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/CJKT.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/Encode.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN {
print "1..0 # Skip: EBCDIC\n";
exit 0;
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/Encoder.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/Unicode.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#

BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
34 changes: 17 additions & 17 deletions t/at-cn.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down Expand Up @@ -49,16 +49,16 @@ run_tests('Simplified Chinese only', {
),

'euc-cn' => join('',
'���׾�����һ��',
'��Ի��',
'����ǬԪ��������ʼ��',
'��ͳ�졣',
'������ʩ��Ʒ�����Ρ�',
'����ʼ�գ���λʱ�ɣ�',
'ʱ�����������졣',
'Ǭ���仯������������',
'���ϴ�ͣ������ꡣ',
'�׳�������������',
'���׾�����һ��',
'��Ի��',
'����ǬԪ��������ʼ��',
'��ͳ�졣',
'������ʩ��Ʒ�����Ρ�',
'����ʼ�գ���λʱ�ɣ�',
'ʱ�����������졣',
'Ǭ���仯������������',
'���ϴ�ͣ������ꡣ',
'�׳�������������',
),

'gb2312-raw' => join('',
Expand Down Expand Up @@ -102,11 +102,11 @@ run_tests('Simplified Chinese + ASCII', {
),

'cp936' => join(chr(10),
'��Ի��',
'���н�����������ǿ��Ϣ��',
'DZ�����ã�������Ҳ�� ���������ʩ��Ҳ�� ����ǬǬ��������Ҳ��',
'��Ծ��Ԩ�����޾�Ҳ���������죬������Ҳ�� �����лڣ�ӯ���ɾ�Ҳ��',
'�þţ���²���Ϊ��Ҳ��',
'��Ի��',
'���н�����������ǿ��Ϣ��',
'DZ�����ã�������Ҳ�� ���������ʩ��Ҳ�� ����ǬǬ��������Ҳ��',
'��Ծ��Ԩ�����޾�Ҳ���������죬������Ҳ�� �����лڣ�ӯ���ɾ�Ҳ��',
'�þţ���²���Ϊ��Ҳ��',
),

'hz' => join(chr(10),
Expand All @@ -121,7 +121,7 @@ run_tests('Simplified Chinese + ASCII', {
run_tests('Traditional Chinese', {
'utf', => 20094.65306.20803.12289.20136.12289.21033.12289.35998,
'gb12345-raw' => 'G,#:T*!":`!"@{!"Uj',
'gbk' => 'Ǭ��Ԫ���ࡢ����ؑ',
'gbk' => 'Ǭ��Ԫ���ࡢ����ؑ',
});

sub run_tests {
Expand Down
18 changes: 9 additions & 9 deletions t/at-tw.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BEGIN {
if (! -d 'blib' and -d 't'){ chdir 't' };
unshift @INC, '../lib';
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down Expand Up @@ -45,18 +45,18 @@ run_tests('Basic Big5 range', {
),

'big5' => (join('',
'�Ұ������]�Ǥ��A�ӬӦҤ�B�e�Q',
'�ᴣ�s�_�s�����A�����G�^�H���Q',
'�Ұ������]�Ǥ��A�ӬӦҤ�B�e�Q',
'�ᴣ�s�_�s�����A�����G�^�H���Q',
)),

'big5-hkscs'=> (join('',
'�Ұ������]�Ǥ��A�ӬӦҤ�B�e�Q',
'�ᴣ�s�_�s�����A�����G�^�H���Q',
'�Ұ������]�Ǥ��A�ӬӦҤ�B�e�Q',
'�ᴣ�s�_�s�����A�����G�^�H���Q',
)),

'cp950' => (join('',
'�Ұ������]�Ǥ��A�ӬӦҤ�B�e�Q',
'�ᴣ�s�_�s�����A�����G�^�H���Q',
'�Ұ������]�Ǥ��A�ӬӦҤ�B�e�Q',
'�ᴣ�s�_�s�����A�����G�^�H���Q',
)),
});

Expand All @@ -70,8 +70,8 @@ run_tests('Hong Kong Extensions', {
),

'big5-hkscs' => join('',
'�P�©Ҧ��ϥ� Perl ��B�͡A���ڒ]�����B�N���M���y',
'�p�G�s�X��������|�A�Чi�D�ڒ]�C'
'�P�©Ҧ��ϥ� Perl ��B�͡A���ڒ]�����B�N���M���y',
'�p�G�s�X��������|�A�Чi�D�ڒ]�C'
),
});

Expand Down
16 changes: 8 additions & 8 deletions t/enc_data.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $Id: enc_data.t,v 2.6 2022/04/07 03:06:40 dankogai Exp $

BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down Expand Up @@ -34,16 +34,16 @@ my @a;

while (<DATA>) {
chomp;
tr/��-��-��/��-��-��/;
tr/��-��-��/��-��-��/;
push @a, $_;
}

is(scalar @a, 3);
is($a[0], "�����DATA�դ�����Ϥ�ɤ�ΤƤ��ȥǥ���");
is($a[1], "���ܸ쥬�������Ѵ��ǥ��륫");
is($a[2], "�ɥ����ΤƤ��ȥ򥷥ƥ��ޥ���");
is($a[0], "�����DATA�դ�����Ϥ�ɤ�ΤƤ��ȥǥ���");
is($a[1], "���ܸ쥬�������Ѵ��ǥ��륫");
is($a[2], "�ɥ����ΤƤ��ȥ򥷥ƥ��ޥ���");

__DATA__
�����DATA�ե�����ϥ�ɥ�Υƥ��ȤǤ���
���ܸ줬�������Ѵ��Ǥ��뤫
�ɤ����Υƥ��Ȥ򤷤Ƥ��ޤ���
�����DATA�ե�����ϥ�ɥ�Υƥ��ȤǤ���
���ܸ줬�������Ѵ��Ǥ��뤫
�ɤ����Υƥ��Ȥ򤷤Ƥ��ޤ���
2 changes: 1 addition & 1 deletion t/enc_eucjp.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is the twin of enc_utf8.t .

BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
6 changes: 3 additions & 3 deletions t/enc_module.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $Id: enc_module.t,v 2.6 2022/04/07 03:06:40 dankogai Exp $
# This file is in euc-jp
BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down Expand Up @@ -43,7 +43,7 @@ local $SIG{__WARN__} = sub{ $DEBUG and print STDERR @_ };

open STDOUT, ">", $file1 or die "$file1:$!";
print $obj->str, "\n";
$obj->set("�ƥ���ʸ����");
$obj->set("�ƥ���ʸ����");
print $obj->str, "\n";

# Please do not move this to a point after the comparison -- Craig Berry
Expand All @@ -54,7 +54,7 @@ close STDOUT unless $^O eq 'freebsd';
my $cmp = compare_text($file0, $file1);
is($cmp, 0, "encoding vs. STDOUT");

my @cmp = qw/���ʸ���� �ƥ���ʸ����/;
my @cmp = qw/���ʸ���� �ƥ���ʸ����/;
open STDIN, "<", $file0 or die "$file0:$!";
$obj = Mod_EUCJP->new;
my $i = 0;
Expand Down
2 changes: 1 addition & 1 deletion t/enc_utf8.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is the twin of enc_eucjp.t .

BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/encoding.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/fallback.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/grow.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/gsm0338.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/guess.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
12 changes: 6 additions & 6 deletions t/jperl.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This script is written in euc-jp

BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down Expand Up @@ -36,13 +36,13 @@ no encoding; # ensure
my $Enamae = "\xbe\xae\xbb\xf4\x20\xc3\xc6"; # euc-jp, with \x escapes
use encoding "euc-jp";

my $Namae = "���� ��"; # in Japanese, in euc-jp
my $Namae = "���� ��"; # in Japanese, in euc-jp
my $Name = "Dan Kogai"; # in English
# euc-jp in \x format but after the pragma. But this one will be converted!
my $Ynamae = "\xbe\xae\xbb\xf4\x20\xc3\xc6";


my $str = $Namae; $str =~ s/���� ��/Dan Kogai/o;
my $str = $Namae; $str =~ s/���� ��/Dan Kogai/o;
is($str, $Name, q{regex});
$str = $Namae; $str =~ s/$Namae/Dan Kogai/o;
is($str, $Name, q{regex - with variable});
Expand Down Expand Up @@ -91,10 +91,10 @@ is (length($Namae), 10);
no strict 'vars'; # fools
# doesn't work w/ "my" as of this writing.
# because of buggy strict.pm and utf8.pm
our $�� = 2;
our $�� = 2;
# ^^U+4eba, "human" in CJK ideograph
$��++; # a child is born
*people = \$��;
$��++; # a child is born
*people = \$��;
is ($people, 3, "Filter:utf8 identifier");
no encoding;
ok(1, "Filter off");
Expand Down
2 changes: 1 addition & 1 deletion t/magic.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/mime-header.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/mime-name.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/perlio.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BEGIN {
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/rt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BEGIN
unshift @INC, '../lib';
$ucmdir = "../ext/Encode/ucm";
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/rt113164.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/rt65541.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/rt76824.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/rt85489.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
2 changes: 1 addition & 1 deletion t/rt86327.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ BEGIN {
chdir 't';
unshift @INC, '../lib';
}
require Config; import Config;
require Config; Config->import;
if ($Config{'extensions'} !~ /\bEncode\b/) {
print "1..0 # Skip: Encode was not built\n";
exit 0;
Expand Down
Loading