diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-15 16:11:17 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-15 16:11:17 +0000 |
commit | 9b30a5d2755d1fa69f991b925e88a64f3bbd7529 (patch) | |
tree | 2b4449818896910a3491fe06b0c7ab1b74840a39 | |
parent | 10bc17b68c7666cd045658934ccb75dd788c8972 (diff) | |
parent | a6a3912c27ed4f9ffb87d242b56d42a194c8b333 (diff) | |
download | perl-9b30a5d2755d1fa69f991b925e88a64f3bbd7529.tar.gz |
Integrate perlio:
[ 15235]
Add the binmode()s to make JP.t pass on Win32
p4raw-link: @15235 on //depot/perlio: a6a3912c27ed4f9ffb87d242b56d42a194c8b333
p4raw-id: //depot/perl@15239
-rw-r--r-- | ext/Encode/t/JP.t | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/Encode/t/JP.t b/ext/Encode/t/JP.t index 8e68ea1886..31ba2da68e 100644 --- a/ext/Encode/t/JP.t +++ b/ext/Encode/t/JP.t @@ -36,9 +36,11 @@ my $ref = File::Spec->catfile($dir,"table.ref"); my $rnd = File::Spec->catfile($dir,"$$.rnd"); print "# Basic decode test\n"; open($src,"<",$euc) || die "Cannot open $euc:$!"; +binmode($src); ok(defined($src) && fileno($src)); $txt = join('',<$src>); open($dst,">:utf8",$utf) || die "Cannot open $utf:$!"; +binmode($dst); ok(defined($dst) && fileno($dst)); $uni = $enc->decode($txt,1); ok(defined($uni)); @@ -50,9 +52,11 @@ ok(compare($utf,$ref) == 0); print "# Basic encode test\n"; open($src,"<:utf8",$ref) || die "Cannot open $ref:$!"; +binmode($src); ok(defined($src) && fileno($src)); $uni = join('',<$src>); open($dst,">",$rnd) || die "Cannot open $rnd:$!"; +binmode($dst); ok(defined($dst) && fileno($dst)); $txt = $enc->encode($uni,1); ok(defined($txt)); @@ -66,8 +70,10 @@ is($enc->name,'euc-jp'); print "# src :encoding test\n"; open($src,"<encoding(euc-jp)",$euc) || die "Cannot open $euc:$!"; +binmode($src); ok(defined($src) && fileno($src)); open($dst,">:utf8",$utf) || die "Cannot open $utf:$!"; +binmode($dst); ok(defined($dst) || fileno($dst)); my $out = select($dst); while (<$src>) @@ -88,8 +94,10 @@ SKIP: #skip "Multi-byte write is broken",3; print "# dst :encoding test\n"; open($src,"<:utf8",$ref) || die "Cannot open $ref:$!"; + binmode($src); ok(defined($src) || fileno($src)); open($dst,">encoding(euc-jp)",$rnd) || die "Cannot open $rnd:$!"; + binmode($dst); ok(defined($dst) || fileno($dst)); my $out = select($dst); while (<$src>) |