Change 13668 by jhi@alpha on 2001/12/13 02:48:14

        Subject: [PATCH] Re: [PATCH t/test.pl t/op/stat.t lib/Net/hostent.t] Unbail out
        From: Michael G Schwern <[EMAIL PROTECTED]> 
        Date: Wed, 12 Dec 2001 21:53:46 -0500
        Message-ID: <20011213025346.GH25129@blackrider>

Affected files ...

.... //depot/perl/lib/Net/hostent.t#5 edit
.... //depot/perl/t/op/stat.t#51 edit
.... //depot/perl/t/test.pl#28 edit

Differences ...

==== //depot/perl/lib/Net/hostent.t#5 (text) ====
Index: perl/lib/Net/hostent.t
--- perl/lib/Net/hostent.t.~1~  Wed Dec 12 20:00:06 2001
+++ perl/lib/Net/hostent.t      Wed Dec 12 20:00:06 2001
@@ -20,9 +20,9 @@
 BEGIN { use_ok 'Net::hostent' }
 
 # Remind me to add this to Test::More.
-sub BAILOUT {
-    print "Bail Out! @_\n";
-    exit;
+sub DIE {
+    print "# @_\n";
+    exit 1;
 }
 
 # test basic resolution of localhost <-> 127.0.0.1
@@ -30,13 +30,13 @@
 
 my $h = gethost('localhost');
 ok(defined $h,  "gethost('localhost')") ||
-  BAILOUT("Can't continue without working gethost: $!");
+  DIE("Can't continue without working gethost: $!");
 
 is( inet_ntoa($h->addr), "127.0.0.1",   'addr from gethost' );
 
 my $i = gethostbyaddr(inet_aton("127.0.0.1"));
 ok(defined $i,  "gethostbyaddr('127.0.0.1')") || 
-  BAILOUT("Can't continue without working gethostbyaddr: $!");
+  DIE("Can't continue without working gethostbyaddr: $!");
 
 is( inet_ntoa($i->addr), "127.0.0.1",   'addr from gethostbyaddr' );
 

==== //depot/perl/t/op/stat.t#51 (xtext) ====
Index: perl/t/op/stat.t
--- perl/t/op/stat.t.~1~        Wed Dec 12 20:00:06 2001
+++ perl/t/op/stat.t    Wed Dec 12 20:00:06 2001
@@ -36,10 +36,10 @@
 
 
 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 @@
 }
 
 # 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 @@
 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);
 }

==== //depot/perl/t/test.pl#28 (text) ====
Index: perl/t/test.pl
--- perl/t/test.pl.~1~  Wed Dec 12 20:00:06 2001
+++ perl/t/test.pl      Wed Dec 12 20:00:06 2001
@@ -325,9 +325,9 @@
 }
 
 
-sub BAILOUT {
-    print STDOUT "Bail out! @_\n";
-    exit;
+sub DIE {
+    print STDOUT "# @_\n";
+    exit 1;
 }
 
 # A somewhat safer version of the sometimes wrong $^X.
End of Patch.

Reply via email to