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));
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));
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>)
#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>)