This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #64772] TODO test for sync on read only handle
authorTony Cook <tony@develop-help.com>
Thu, 31 May 2012 09:34:44 +0000 (19:34 +1000)
committerTony Cook <tony@develop-help.com>
Fri, 1 Jun 2012 11:21:32 +0000 (21:21 +1000)
dist/IO/t/io_xs.t

index 379094f..a86ee7e 100644 (file)
@@ -15,7 +15,7 @@ BEGIN {
     }
 }
 
     }
 }
 
-use Test::More tests => 4;
+use Test::More tests => 5;
 use IO::File;
 use IO::Seekable;
 
 use IO::File;
 use IO::Seekable;
 
@@ -39,3 +39,12 @@ $! = 0;
 $x->setpos(undef);
 ok($!, "setpos(undef) makes errno non-zero");
 
 $x->setpos(undef);
 ok($!, "setpos(undef) makes errno non-zero");
 
+SKIP:
+{
+    $^O eq "MSWin32"
+       and skip "directory sync doesn't apply to MSWin32", 1;
+    open my $dh, "<", "."
+       or skip "Cannot open the cwd", 1;
+    local $TODO = "[perl #64772] IO::Handle->sync fails on an O_RDONLY descriptor";
+    ok($dh->sync, "sync to a read only directory handle");
+}