Change 15224 by jhi@alpha on 2002/03/14 14:24:44

        Extra paranoia from Nick Clark.

Affected files ...

.... //depot/perl/ext/Safe/safe2.t#3 edit

Differences ...

==== //depot/perl/ext/Safe/safe2.t#3 (xtext) ====
Index: perl/ext/Safe/safe2.t
--- perl/ext/Safe/safe2.t.~1~   Thu Mar 14 07:30:06 2002
+++ perl/ext/Safe/safe2.t       Thu Mar 14 07:30:06 2002
@@ -118,14 +118,18 @@
 
 # --- rdo
   
+my $t = 30;
 my $nosuch = '/non/existant/file.name';
 open(NOSUCH, $nosuch);
-my $errno  = $! + 0;
+if ($@) {
+    my $errno  = $!;
+    $cpt->rdo($nosuch);
+    print $! == $errno ? "ok $t\n" : sprintf "not ok $t # \"$!\" is %d (expected 
+%d)\n", $!, $errno; $t++;
+} else {
+    die "Eek! Didn't expect $nosuch to be there.";
+}
 close(NOSUCH);
 
-my $t = 30;
-$cpt->rdo($nosuch);
-print $! == $errno ? "ok $t\n" : sprintf "not ok $t # \"$!\" is %d (expected %d)\n", 
$!, $errno; $t++;
 # test #31 is gone.
 print "ok $t\n"; $t++;
   
End of Patch.

Reply via email to