Change 13942 by jhi@alpha on 2001/12/29 21:12:02

        Subject: [PATCH] cleaner close on tests, take 2
        From: [EMAIL PROTECTED] (Andreas J. Koenig)
        Date: 29 Dec 2001 21:42:37 +0100
        Message-ID: <[EMAIL PROTECTED]>
        
        (the DB_File patches)

Affected files ...

.... //depot/perl/ext/DB_File/t/db-btree.t#9 edit
.... //depot/perl/ext/DB_File/t/db-hash.t#9 edit
.... //depot/perl/ext/DB_File/t/db-recno.t#10 edit

Differences ...

==== //depot/perl/ext/DB_File/t/db-btree.t#9 (xtext) ====
Index: perl/ext/DB_File/t/db-btree.t
--- perl/ext/DB_File/t/db-btree.t.~1~   Sat Dec 29 14:15:05 2001
+++ perl/ext/DB_File/t/db-btree.t       Sat Dec 29 14:15:05 2001
@@ -156,6 +156,7 @@
 
 my ($X, %h) ;
 ok(19, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ;
+die "Could not tie: $!" unless $X;
 
 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
    $blksize,$blocks) = stat($Dfile);
@@ -525,9 +526,9 @@
  
  
 my (%g, %k);
-tie(%h, 'DB_File',$Dfile1, O_RDWR|O_CREAT, 0640, $dbh1 ) ; 
-tie(%g, 'DB_File',$Dfile2, O_RDWR|O_CREAT, 0640, $dbh2 ) ;
-tie(%k, 'DB_File',$Dfile3, O_RDWR|O_CREAT, 0640, $dbh3 ) ;
+tie(%h, 'DB_File',$Dfile1, O_RDWR|O_CREAT, 0640, $dbh1 ) or die $!;
+tie(%g, 'DB_File',$Dfile2, O_RDWR|O_CREAT, 0640, $dbh2 ) or die $!;
+tie(%k, 'DB_File',$Dfile3, O_RDWR|O_CREAT, 0640, $dbh3 ) or die $!;
  
 my @Keys = qw( 0123 12 -1234 9 987654321 def  ) ;
 my (@srt_1, @srt_2, @srt_3);

==== //depot/perl/ext/DB_File/t/db-hash.t#9 (xtext) ====
Index: perl/ext/DB_File/t/db-hash.t
--- perl/ext/DB_File/t/db-hash.t.~1~    Sat Dec 29 14:15:05 2001
+++ perl/ext/DB_File/t/db-hash.t        Sat Dec 29 14:15:05 2001
@@ -125,6 +125,7 @@
 # Now check the interface to HASH
 my ($X, %h);
 ok(15, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_HASH ) );
+die "Could not tie: $!" unless $X;
 
 my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
    $blksize,$blocks) = stat($Dfile);

==== //depot/perl/ext/DB_File/t/db-recno.t#10 (xtext) ====
Index: perl/ext/DB_File/t/db-recno.t
--- perl/ext/DB_File/t/db-recno.t.~1~   Sat Dec 29 14:15:05 2001
+++ perl/ext/DB_File/t/db-recno.t       Sat Dec 29 14:15:05 2001
@@ -444,7 +444,7 @@
    1 ;
 EOM
 
-    close FILE ;
+    close FILE  or die "Could not close: $!";
 
     BEGIN { push @INC, '.'; } 
     eval 'use SubDB ; ';
@@ -454,6 +454,7 @@
     eval '
        $X = tie(@h, "SubDB","recno.tmp", O_RDWR|O_CREAT, 0640, $DB_RECNO );
        ' ;
+    die "Could not tie: $!" unless $X;
 
     main::ok(68, $@ eq "") ;
 
End of Patch.

Reply via email to