This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update autodie to CPAN version 2.26
[perl5.git] / cpan / autodie / t / utf8_open.t
index d328853..5ccd5e3 100644 (file)
@@ -9,7 +9,6 @@ use autodie;
 
 use Fcntl;
 use File::Temp;
-
 use Test::More;
 
 if( $] < '5.01000' ) {
@@ -73,6 +72,15 @@ else {
         my @layers = PerlIO::get_layers($fh);
         ok( (grep { $_ eq 'utf8' } @layers), "open implicit read honors open pragma" ) or diag join ", ", @layers;
     }
+
+    # raw
+    {
+        open my $fh, ">:raw", $file;
+
+        my @layers = PerlIO::get_layers($fh);
+
+        ok( !(grep { $_ eq 'utf8' } @layers), 'open pragma is not used if raw is specified' ) or diag join ", ", @layers;
+    }
 }