From 68335a23cdf78e29bdcebb364607bf4f1d8a52c1 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 30 Apr 2000 04:40:44 +0000 Subject: stock perl 5.6.1 --- gnu/usr.bin/perl/t/lib/syslog.t | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gnu/usr.bin/perl/t/lib/syslog.t (limited to 'gnu/usr.bin') diff --git a/gnu/usr.bin/perl/t/lib/syslog.t b/gnu/usr.bin/perl/t/lib/syslog.t new file mode 100644 index 00000000000..2ed887ac543 --- /dev/null +++ b/gnu/usr.bin/perl/t/lib/syslog.t @@ -0,0 +1,23 @@ +#!./perl + +BEGIN { + chdir 't' if -d 't'; + unshift @INC, '../lib'; + require Config; import Config; + if ($Config{'extensions'} !~ /\bSyslog\b/) { + print "1..0 # Skip: Sys::Syslog was not built\n"; + exit 0; + } +} + +use Sys::Syslog qw(:DEFAULT setlogsock); + +print "1..6\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') }) ? "ok 3\n" : "not ok 3\n"; + +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"; +print defined(eval { syslog('info', 'test') }) ? "ok 6\n" : "not ok 6\n"; -- cgit v1.2.3