summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-07-08 21:54:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-07-08 21:54:55 +0000
commit9287a323f956849348c19a4d945e5121df84e5d3 (patch)
tree8435fe8423c27431643cb48d2c7c4af0a522adf5 /t
parent644a288060ff8d01051c5c7e2f4f9f49a69a8eab (diff)
parent51371543ca1a75ed152020ad0846b5b8cf11c32f (diff)
downloadperl-9287a323f956849348c19a4d945e5121df84e5d3.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@3661
Diffstat (limited to 't')
-rwxr-xr-xt/io/openpid.t8
-rw-r--r--t/pragma/warn/op29
2 files changed, 21 insertions, 16 deletions
diff --git a/t/io/openpid.t b/t/io/openpid.t
index 334bc0d65b..21ec0830d4 100755
--- a/t/io/openpid.t
+++ b/t/io/openpid.t
@@ -14,6 +14,7 @@ BEGIN {
use FileHandle;
+use Config;
autoflush STDOUT 1;
$SIG{PIPE} = 'IGNORE';
@@ -49,12 +50,15 @@ print "ok 4\n";
print "# pids were $pid1, $pid2, $pid3, $pid4\n";
+my $killsig = 'HUP';
+$killsig = 1 unless $Config{sig_name} =~ /\bHUP\b/;
+
# get message from first process and kill it
chomp($from_pid1 = scalar(<FH1>));
print "# child1 returned [$from_pid1]\nnot "
unless $from_pid1 eq 'first process';
print "ok 5\n";
-$kill_cnt = kill 'HUP', $pid1;
+$kill_cnt = kill $killsig, $pid1;
print "not " unless $kill_cnt == 1;
print "ok 6\n";
@@ -63,7 +67,7 @@ chomp($from_pid2 = scalar(<FH2>));
print "# child2 returned [$from_pid2]\nnot "
unless $from_pid2 eq 'second process';
print "ok 7\n";
-$kill_cnt = kill 'HUP', $pid2, $pid3;
+$kill_cnt = kill $killsig, $pid2, $pid3;
print "not " unless $kill_cnt == 2;
print "ok 8\n";
diff --git a/t/pragma/warn/op b/t/pragma/warn/op
index dce52d8c93..2377066622 100644
--- a/t/pragma/warn/op
+++ b/t/pragma/warn/op
@@ -555,6 +555,7 @@ Useless use of a constant in void context at - line 3.
Useless use of a constant in void context at - line 4.
########
# op.c
+$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3; # known scalar leak
use warning 'unsafe' ;
my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
@a =~ /abc/ ;
@@ -586,20 +587,20 @@ my $a ; my @a = () ; my %a = () ; my $b = \@a ; my $c = \%a ;
%$c =~ tr/a/b/ ;
}
EXPECT
-Applying pattern match to @array will act on scalar(@array) at - line 4.
-Applying substitution to @array will act on scalar(@array) at - line 5.
-Can't modify private array in substitution at - line 5, near "s/a/b/ ;"
-Applying character translation to @array will act on scalar(@array) at - line 6.
-Applying pattern match to @array will act on scalar(@array) at - line 7.
-Applying substitution to @array will act on scalar(@array) at - line 8.
-Applying character translation to @array will act on scalar(@array) at - line 9.
-Applying pattern match to %hash will act on scalar(%hash) at - line 10.
-Applying substitution to %hash will act on scalar(%hash) at - line 11.
-Applying character translation to %hash will act on scalar(%hash) at - line 12.
-Applying pattern match to %hash will act on scalar(%hash) at - line 13.
-Applying substitution to %hash will act on scalar(%hash) at - line 14.
-Applying character translation to %hash will act on scalar(%hash) at - line 15.
-BEGIN not safe after errors--compilation aborted at - line 17.
+Applying pattern match to @array will act on scalar(@array) at - line 5.
+Applying substitution to @array will act on scalar(@array) at - line 6.
+Can't modify private array in substitution at - line 6, near "s/a/b/ ;"
+Applying character translation to @array will act on scalar(@array) at - line 7.
+Applying pattern match to @array will act on scalar(@array) at - line 8.
+Applying substitution to @array will act on scalar(@array) at - line 9.
+Applying character translation to @array will act on scalar(@array) at - line 10.
+Applying pattern match to %hash will act on scalar(%hash) at - line 11.
+Applying substitution to %hash will act on scalar(%hash) at - line 12.
+Applying character translation to %hash will act on scalar(%hash) at - line 13.
+Applying pattern match to %hash will act on scalar(%hash) at - line 14.
+Applying substitution to %hash will act on scalar(%hash) at - line 15.
+Applying character translation to %hash will act on scalar(%hash) at - line 16.
+BEGIN not safe after errors--compilation aborted at - line 18.
########
# op.c
use warning 'syntax' ;