diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-05-19 04:24:27 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-05-19 04:24:27 +0000 |
commit | fcc05d01c240ec29422ab0ec7d098141519ca384 (patch) | |
tree | fa4361b1642980a79e1fe4011b1cf54ea1ae429c /ext/Encode/t | |
parent | 6ec4bd10d4541458cd84a1df72dd948b519e53e9 (diff) | |
download | perl-fcc05d01c240ec29422ab0ec7d098141519ca384.tar.gz |
Make the test work without perlio, from Dan Kogai.
p4raw-id: //depot/perl@19559
Diffstat (limited to 'ext/Encode/t')
-rw-r--r-- | ext/Encode/t/Unicode.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/Encode/t/Unicode.t b/ext/Encode/t/Unicode.t index 50e5ba0ac5..3329d7c650 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, |