diff options
author | Michael G. Schwern <schwern@pobox.com> | 2001-12-12 16:53:46 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-13 02:48:14 +0000 |
commit | c4fbe2471f42249bd57e1c071c99349d2331aea5 (patch) | |
tree | 04bdcfd3cd648684f746f4102e342ff821c295dc /t | |
parent | 20dd405caf5525a1659669e686c37f3d71a0ef6e (diff) | |
download | perl-c4fbe2471f42249bd57e1c071c99349d2331aea5.tar.gz |
Re: [PATCH t/test.pl t/op/stat.t lib/Net/hostent.t] Unbail out
Message-ID: <20011213025346.GH25129@blackrider>
p4raw-id: //depot/perl@13668
Diffstat (limited to 't')
-rwxr-xr-x | t/op/stat.t | 10 | ||||
-rw-r--r-- | t/test.pl | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/t/op/stat.t b/t/op/stat.t index 299972d109..57460fcfd1 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -36,10 +36,10 @@ my $tmpfile_link = $tmpfile.'2'; unlink $tmpfile; -open(FOO, ">$tmpfile") || BAILOUT("Can't open temp test file: $!"); +open(FOO, ">$tmpfile") || DIE("Can't open temp test file: $!"); close FOO; -open(FOO, ">$tmpfile") || BAILOUT("Can't open temp test file: $!"); +open(FOO, ">$tmpfile") || DIE("Can't open temp test file: $!"); my($nlink, $mtime, $ctime) = (stat(FOO))[$NLINK, $MTIME, $CTIME]; SKIP: { @@ -109,13 +109,13 @@ DIAG } # truncate and touch $tmpfile. -open(F, ">$tmpfile") || BAILOUT("Can't open temp test file: $!"); +open(F, ">$tmpfile") || DIE("Can't open temp test file: $!"); close F; ok(-z $tmpfile, '-z on empty file'); ok(! -s $tmpfile, ' and -s'); -open(F, ">$tmpfile") || BAILOUT("Can't open temp test file: $!"); +open(F, ">$tmpfile") || DIE("Can't open temp test file: $!"); print F "hi\n"; close F; @@ -296,7 +296,7 @@ my $Null = File::Spec->devnull; SKIP: { skip "No null device to test with", 1 unless -e $Null; - open(NULL, $Null) or BAIL_OUT("Can't open $Null: $!"); + open(NULL, $Null) or DIE("Can't open $Null: $!"); ok(! -t NULL, 'null device is not a TTY'); close(NULL); } @@ -325,9 +325,9 @@ sub runperl { } -sub BAILOUT { - print STDOUT "Bail out! @_\n"; - exit; +sub DIE { + print STDOUT "# @_\n"; + exit 1; } # A somewhat safer version of the sometimes wrong $^X. |