From f41ed1f750631f0a9e5dcf335ee0828decfbbc66 Mon Sep 17 00:00:00 2001 From: "Kurt D. Starsinic" Date: Wed, 25 Oct 2000 08:13:54 -0400 Subject: [PATCH] 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 --- t/lib/syslog.t | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/t/lib/syslog.t b/t/lib/syslog.t index 14f789a..d73e973 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" } -- 2.7.4