summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2000-12-05 16:23:28 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-06 16:09:09 +0000
commitb75c8c73cd7f3c92a16e03fb046f4e2a99363bc7 (patch)
tree5fb2cf9e3d6c40bda2bc9505b5cb8026acdb24dc /t
parentd2ab394d8cfda924d5c38dd9722ad367a06ffeca (diff)
downloadperl-b75c8c73cd7f3c92a16e03fb046f4e2a99363bc7.tar.gz
$VERSION crusade, strict, tests, etc... all over lib/
Message-ID: <20001205212328.C6473@blackrider.aocn.com> Carp::Heavy parts not very applicable because of recent changes. p4raw-id: //depot/perl@8013
Diffstat (limited to 't')
-rw-r--r--t/lib/attrs.t7
-rwxr-xr-xt/lib/syslog.t19
2 files changed, 21 insertions, 5 deletions
diff --git a/t/lib/attrs.t b/t/lib/attrs.t
index 440122c2b4..18a02aba84 100644
--- a/t/lib/attrs.t
+++ b/t/lib/attrs.t
@@ -11,9 +11,12 @@ BEGIN {
}
}
+use warnings;
+no warnings qw(deprecated); # else attrs cries.
+
sub NTESTS () ;
-my $test, $ntests;
+my ($test, $ntests);
BEGIN {$ntests=0}
$test=0;
my $failed = 0;
@@ -119,7 +122,7 @@ BEGIN {++$ntests}
{
my $w = "" ;
- local $SIG{__WARN__} = sub {$w = @_[0]} ;
+ local $SIG{__WARN__} = sub {$w = shift} ;
eval 'sub w1 ($) { use warnings "deprecated"; use attrs "locked"; $_[0]++ }';
(print "not "), $failed=1 if $@;
print "ok ",++$test,"\n";
diff --git a/t/lib/syslog.t b/t/lib/syslog.t
index 05d8b22f4b..04adb6bed9 100755
--- a/t/lib/syslog.t
+++ b/t/lib/syslog.t
@@ -24,6 +24,10 @@ BEGIN {
use Sys::Syslog qw(:DEFAULT setlogsock);
+# Test this to 1 if your syslog accepts udp connections.
+# Most don't (or at least shouldn't)
+my $Test_Syslog_INET = 0;
+
print "1..6\n";
if (Sys::Syslog::_PATH_LOG()) {
@@ -45,6 +49,15 @@ else {
for (1..3) { print "ok $_ # skipping, _PATH_LOG unavailable\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";
+if( $Test_Syslog_INET ) {
+ 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";
+}
+else {
+ print "ok $_ # skipped(assuming syslog doesn't accept inet connections)\n"
+ foreach (4..6);
+}