This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
update TOC for perl5153delta
[perl5.git] / t / io / errno.t
index 6294ed7..dadc4e0 100644 (file)
@@ -5,11 +5,13 @@
 # http://rt.perl.org/rt3/Ticket/Display.html?id=39060
 
 use strict;
+use Config;
+
 require './test.pl';
 
 plan( tests => 16 );
 
-my $test_prog = 'while(<>){print}; print $!';
+my $test_prog = 'undef $!;while(<>){print}; print $!';
 my $saved_perlio;
 
 BEGIN {
@@ -25,13 +27,20 @@ for my $perlio ('perlio', 'stdio') {
 SKIP:
     for my $test_in ("test\n", "test") {
                skip("Guaranteed newline at EOF on VMS", 4) if $^O eq 'VMS' && $test_in eq 'test';
+                skip("[perl #71504] OpenBSD test failures in errno.t with ithreads and perlio", 8)
+                    if $^O eq 'openbsd' && $Config{useithreads} && $perlio eq 'stdio';
                my $test_in_esc = $test_in;
                $test_in_esc =~ s/\n/\\n/g;
                for my $rs_code ('', '$/=undef', '$/=\2', '$/=\1024') {
+                   TODO:
+                   {
+                       local $::TODO = "We get RMS\$_IOP at EOF on VMS when \$/ is undef"
+                           if $^O eq 'VMS' && $rs_code eq '$/=undef';
                        is( runperl( prog => "$rs_code; $test_prog",
                                                 stdin => $test_in, stderr => 1),
                                $test_in,
                                "Wrong errno, PERLIO=$ENV{PERLIO} stdin='$test_in_esc', $rs_code");
+                   }
                }
     }
 }