From: Jarkko Hietaniemi Date: Mon, 19 May 2003 04:24:27 +0000 (+0000) Subject: Make the test work without perlio, from Dan Kogai. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fcc05d01c240ec29422ab0ec7d098141519ca384;p=p5sagit%2Fp5-mst-13.2.git Make the test work without perlio, from Dan Kogai. p4raw-id: //depot/perl@19559 --- diff --git a/ext/Encode/t/Unicode.t b/ext/Encode/t/Unicode.t index 50e5ba0..3329d7c 100644 --- a/ext/Encode/t/Unicode.t +++ b/ext/Encode/t/Unicode.t @@ -116,7 +116,12 @@ my @file = sort grep {/\.utf$/o} readdir $dh; closedir $dh; for my $file (@file){ my $path = File::Spec->catfile($dir, $file); - open my $fh, '<:utf8', $path or die "$path:$!"; ++ open my $fh, '<', $path or die "$path:$!"; + if (PerlIO::Layer->find('perlio')){ + binmode $fh => ':utf8'; + }else{ + binmode $fh; + } my $content = join('' => <$fh>); close $fh; is(decode("UTF-7", encode("UTF-7", $content)), $content,