summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorTim Jenness <tjenness@cpan.org>2000-08-30 17:39:33 -1000
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-31 14:37:42 +0000
commit6a86bc9a770464d915a666c2fdfa6453d6cf11a9 (patch)
treee13c85ff9bac17fbb3a73c0cf499f0d8e8f10254 /t
parent2f4ff1581cbdb9f47106a9ae24e32767d4522dcb (diff)
downloadperl-6a86bc9a770464d915a666c2fdfa6453d6cf11a9.tar.gz
Wrap the test in eval.
Subject: Re: [ID 20000831.009] Not OK: perl v5.7.0 +DEVEL6932 on sun4-solaris2.8 (UNINSTALLED) Message-ID: <Pine.LNX.4.21.0008310311190.7444-100000@lapaki.jach.hawaii.edu> p4raw-id: //depot/perl@6944
Diffstat (limited to 't')
-rwxr-xr-xt/lib/ftmp-security.t20
1 files changed, 14 insertions, 6 deletions
diff --git a/t/lib/ftmp-security.t b/t/lib/ftmp-security.t
index 18f427d710..b8ae4e5ae9 100755
--- a/t/lib/ftmp-security.t
+++ b/t/lib/ftmp-security.t
@@ -97,31 +97,39 @@ sub test_security {
# Create the tempfile
my $template = "tmpXXXXX";
- my ($fh1, $fname1) = tempfile ( $template,
+ my ($fh1, $fname1) = eval { tempfile ( $template,
DIR => File::Spec->tmpdir,
UNLINK => 1,
);
+ };
+
if (defined $fname1) {
print "# fname1 = $fname1\n";
ok( (-e $fname1) );
+ push(@files, $fname1); # store for end block
} elsif (File::Temp->safe_level() != File::Temp::STANDARD) {
- skip("system possibly insecure, see INSTALL, section 'make test'", 1);
+ my $skip2 = "Skip system possibly insecure, see INSTALL, section 'make test'";
+ skip($skip2, 1);
+ # plus we need an end block so the tests come out in the right order
+ eval q{ END { skip($skip2,1); } 1; } || die;
} else {
ok(0);
}
# Explicitly
- my ($fh2, $fname2) = tempfile ($template, UNLINK => 1 );
+ my ($fh2, $fname2) = eval { tempfile ($template, UNLINK => 1 ); };
if (defined $fname2) {
print "# fname2 = $fname2\n";
ok( (-e $fname2) );
+ push(@files, $fname2); # store for end block
close($fh2);
} elsif (File::Temp->safe_level() != File::Temp::STANDARD) {
- skip("system possibly insecure, see INSTALL, section 'make test'", 1);
+ my $skip2 = "Skip system possibly insecure, see INSTALL, section 'make test'";
+ skip($skip2, 1);
+ # plus we need an end block so the tests come out in the right order
+ eval q{ END { skip($skip2,1); } 1; } || die;
} else {
ok(0);
}
- # Store filenames for the end block
- push(@files, $fname1, $fname2);
}