This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
As using -C to turn on utf8 IO is equivalent to the open pragma,
authorNicholas Clark <nick@ccl4.org>
Wed, 9 Nov 2005 20:53:29 +0000 (20:53 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 9 Nov 2005 20:53:29 +0000 (20:53 +0000)
change 25925 had the side effect of breaking t/io/utf8.t
Fixed by adding the missing binmode()s.

p4raw-id: //depot/perl@26065

t/io/utf8.t

index acfb239..532ea7f 100755 (executable)
@@ -152,18 +152,24 @@ open F, ">:utf8", "a" or die $!;
 print F $a;
 close F;
 open F, ">>", "a" or die $!;
+binmode(F, ":bytes");
 print F chr(130)."\n";
 close F;
 
 open F, "<", "a" or die $!;
+binmode(F, ":bytes");
 $x = <F>; chomp $x;
-is( $x, $chr );
+SKIP: {
+    skip("Defaulting to UTF-8 output means that we can't generate a mangled file")
+       if $UTF8_OUTPUT;
+    is( $x, $chr );
+}
 
 # Now we have a deformed file.
 
 SKIP: {
     if (ord('A') == 193) {
-       skip( "EBCDIC doesn't complain" );
+       skip("EBCDIC doesn't complain", 2);
     } else {
        my @warnings;
        open F, "<:utf8", "a" or die $!;