[libyaml-libyaml-perl] 03/11: no utf8 mode on IO::File handle

gregor herrmann gregoa at debian.org
Fri Mar 18 18:03:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch gregoa/use-system-yaml
in repository libyaml-libyaml-perl.

commit 95e14bbd584fea857d97fae3ff7ced4b8b33f31b
Author: Tina Müller <cpan2 at tinita.de>
Date:   Fri Feb 19 19:05:54 2016 +0100

    no utf8 mode on IO::File handle
---
 test/io-handle.t | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/test/io-handle.t b/test/io-handle.t
index 4151ab4..df8c578 100644
--- a/test/io-handle.t
+++ b/test/io-handle.t
@@ -3,6 +3,7 @@ use lib -e 't' ? 't' : 'test';
 my $t = -e 't' ? 't' : 'test';
 
 use utf8;
+use Encode;
 use IO::Pipe;
 use IO::File;
 use t::TestYAML tests => 6;
@@ -32,15 +33,15 @@ my $file = "$t/dump-io-file-$$.yaml";
 my $fh = new IO::File;
 
 # write to IO::File handle
-$fh->open($file, '>:utf8') or die $!;
+$fh->open($file, ">") or die $!;
 DumpFile($fh, $testdata);
 $fh->close;
 ok -e $file, 'IO::File output file exists';
 
 # read from IO::File handle
-$fh->open($file, '<:utf8') or die $!;
+$fh->open($file, '<') or die $!;
 my $yaml = do { local $/; <$fh> };
-is $yaml, "--- $testdata\n", 'LoadFile from IO::File contents is correct';
+is decode_utf8($yaml), "--- $testdata\n", 'LoadFile from IO::File contents is correct';
 
 $fh->seek(0, 0);
 my $read_data = LoadFile($fh) or die $!;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libyaml-libyaml-perl.git



More information about the Pkg-perl-cvs-commits mailing list