summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt D. Starsinic <kstar@wolfetech.com>2000-10-25 08:13:54 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-25 20:03:53 +0000
commitf41ed1f750631f0a9e5dcf335ee0828decfbbc66 (patch)
tree298cb21f70b8496cd9b3ee2b4248b9181f4f7bed
parentdcad28805702d580064bc39a267d63c58bbb3b3f (diff)
downloadperl-f41ed1f750631f0a9e5dcf335ee0828decfbbc66.tar.gz
A new version of making the syslog test more robust.
(Replaces #7421.) Subject: Re: [ID 20001022.001] Not OK: perl v5.7.0 +DEVEL7368 on i686-linux 2.2.16 Message-ID: <20001025121354.B2264@O2.chapin.edu> p4raw-id: //depot/perl@7440
-rwxr-xr-xt/lib/syslog.t18
1 files changed, 14 insertions, 4 deletions
diff --git a/t/lib/syslog.t b/t/lib/syslog.t
index 14f789a58d..d73e973b39 100755
--- a/t/lib/syslog.t
+++ b/t/lib/syslog.t
@@ -14,10 +14,20 @@ use Sys::Syslog qw(:DEFAULT setlogsock);
print "1..6\n";
-if (Sys::Syslog::_PATH_LOG() and -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') }) ? "ok 3\n" : "not ok 3\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') }) ? "ok 3\n" : "not ok 3\n";
+ }
+ else {
+ for (1..3) {
+ print
+ "ok $_ # skipping, file ",
+ Sys::Syslog::_PATH_LOG(),
+ " does not exist\n";
+ }
+ }
}
else {
for (1..3) { print "ok $_ # skipping, _PATH_LOG unavailable\n" }