syslog.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!./perl
BEGIN {
chdir 't' if -d 't';
print "1..0 # Skip: Sys::Syslog was not built\n";
exit 0;
}
print "1..0 # Skip: Socket was not built\n";
exit 0;
}
require Socket;
# This code inspired by Sys::Syslog::connect():
exit 0;
}
}
BEGIN {
print "1..0 # Skip: missing macros\n";
exit 0;
}
}
}
# Test this to 1 if your syslog accepts udp connections.
# Most don't (or at least shouldn't)
my $Test_Syslog_INET = 0;
my $test_string = "uid $< is testing perl $] syslog capabilities";
print "1..6\n";
# The only known $^O eq 'svr4' that needs this is NCR MP-RAS,
# but assuming 'stream' in SVR4 is probably not that bad.
} else {
}
print "ok 2\n";
? "ok 3\n" : "not ok 3 # $!\n";
} else {
print "ok 2 # Skip: syslogd not running\n";
} else {
print "not ok 2 # $@\n";
}
print "ok 3 # Skip: openlog failed\n";
}
} else {
for (1..3) {
print
"ok $_ # Skip: file ",
" does not exist\n";
}
}
}
else {
for (1..3) { print "ok $_ # Skip: _PATH_LOG unavailable\n" }
}
: "not ok 4\n";
: "not ok 5 # $!\n";
: "not ok 6 # $!\n";
}
else {
print "ok $_ # Skip: assuming syslog doesn't accept inet connections\n"
foreach (4..6);
}