summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-04-30 04:40:44 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-04-30 04:40:44 +0000
commit68335a23cdf78e29bdcebb364607bf4f1d8a52c1 (patch)
tree79c89f1af307e2b7b8498e65e10b96ce728cf067 /gnu
parentaa23434f6c70353adb0deea1ea8a1e8016bea418 (diff)
stock perl 5.6.1
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/perl/t/lib/syslog.t23
1 files changed, 23 insertions, 0 deletions
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";