MacOS X 10.1.5 still failing the DB tests.
[p5sagit/p5-mst-13.2.git] / ext / Sys / Syslog / syslog.t
index 77aff13..30695e2 100755 (executable)
@@ -8,6 +8,10 @@ BEGIN {
        print "1..0 # Skip: Sys::Syslog was not built\n";
        exit 0;
     }
+    if ($Config{'extensions'} !~ /\bSocket\b/) {
+       print "1..0 # Skip: Socket was not built\n";
+       exit 0;
+    }
 
     require Socket;
 
@@ -25,7 +29,7 @@ BEGIN {
 BEGIN {
   eval {require Sys::Syslog} or do {
     if ($@ =~ /Your vendor has not/) {
-      print "1..0 # Skipped: missing macros\n";
+      print "1..0 # Skip: missing macros\n";
       exit 0;
     }
   }
@@ -43,32 +47,32 @@ print "1..6\n";
 
 if (Sys::Syslog::_PATH_LOG()) {
     if (-e Sys::Syslog::_PATH_LOG()) {
-        print defined(eval { setlogsock('unix') }) ? "ok 1\n" : "not ok 1\n";
-        print defined(eval { openlog('perl', 'ndelay', 'local0') }) ? "ok 2\n" : "not ok 2\n";
-        print defined(eval { syslog('info', $test_string ) }) ? "ok 3\n" : "not ok 3\n";
+        print defined(eval { setlogsock('unix') }) ? "ok 1\n" : "not ok 1 # $!\n";
+        print defined(eval { openlog('perl', 'ndelay', 'local0') }) ? "ok 2\n" : "not ok 2 # $!\n";
+        print defined(eval { syslog('info', $test_string ) }) ? "ok 3\n" : "not ok 3 # $!\n";
     }
     else {
         for (1..3) {
             print
-                "ok $_ # skipping, file ",
+                "ok $_ # Skip: file ",
                 Sys::Syslog::_PATH_LOG(),
                 " does not exist\n";
         }
     }
 }
 else {
-    for (1..3) { print "ok $_ # skipping, _PATH_LOG unavailable\n" }
+    for (1..3) { print "ok $_ # Skip: _PATH_LOG unavailable\n" }
 }
 
 if( $Test_Syslog_INET ) {
     print defined(eval { setlogsock('inet') }) ? "ok 4\n" 
                                                : "not ok 4\n";
     print defined(eval { openlog('perl', 'ndelay', 'local0') }) ? "ok 5\n" 
-                                                                : "not ok 5\n";
+                                                                : "not ok 5 # $!\n";
     print defined(eval { syslog('info', $test_string ) }) ? "ok 6\n" 
-                                                   : "not ok 6\n";
+                                                   : "not ok 6 # $!\n";
 }
 else {
-    print "ok $_ # skipped(assuming syslog doesn't accept inet connections)\n" 
+    print "ok $_ # Skip: assuming syslog doesn't accept inet connections\n" 
       foreach (4..6);
 }