Subject: | recv.t test 5-6 fail if STDIN is closed. |
Hi, while running test suites for blead on centos 5 through an automated system. I encountered
a bug with autodie.
t/recv.t assumes STDIN is opened in test 5-6. I'm attaching a patch to skip if STDIN is closed.
Subject: | recv.patch.txt |
commit d17ed11380d4e2501141c48195453f99722e67b4
Author: Todd Rinaldo <toddr@cpan.org>
Date: Wed Feb 8 15:34:58 2012 -0600
blead cpan autodie recv.t
breaks when STDIN is closed
diff --git a/SOURCES/perl/cpan/autodie/t/recv.t b/SOURCES/perl/cpan/autodie/t/recv.t
index cfaa679..45a1093 100644
--- a/SOURCES/perl/cpan/autodie/t/recv.t
+++ b/SOURCES/perl/cpan/autodie/t/recv.t
@@ -37,13 +37,18 @@ SKIP: {
}
-eval {
- # STDIN isn't a socket, so this should fail.
- recv(STDIN,$buffer,1,0);
-};
+SKIP: {
+ skip("cannot test recv on STDIN when it's closed", 2)
+ unless( STDIN->opened );
-ok($@,'recv dies on returning undef');
-isa_ok($@,'autodie::exception');
+ eval {
+ # STDIN isn't a socket, so this should fail.
+ recv(STDIN,$buffer,1,0);
+ };
+
+ ok($@,'recv dies on returning undef');
+ isa_ok($@,'autodie::exception');
+}
$buffer = "# Not an empty string\n";