summaryrefslogtreecommitdiff
path: root/ext/Encode/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-05-19 04:24:27 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-05-19 04:24:27 +0000
commitfcc05d01c240ec29422ab0ec7d098141519ca384 (patch)
treefa4361b1642980a79e1fe4011b1cf54ea1ae429c /ext/Encode/t
parent6ec4bd10d4541458cd84a1df72dd948b519e53e9 (diff)
downloadperl-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.t7
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,