Make the test work without perlio, from Dan Kogai.
authorJarkko Hietaniemi <jhi@iki.fi>
Mon, 19 May 2003 04:24:27 +0000 (04:24 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 19 May 2003 04:24:27 +0000 (04:24 +0000)
p4raw-id: //depot/perl@19559

ext/Encode/t/Unicode.t

index 50e5ba0..3329d7c 100644 (file)
@@ -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,