diff options
author | Andreas König <a.koenig@mind.de> | 2001-12-29 22:42:37 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-29 21:12:02 +0000 |
commit | 05a54443881edbdd9642c814968256dccb1f4e5f (patch) | |
tree | d48011da0c6e6dac5e71432f149ba2cabe3efa26 /ext/DB_File | |
parent | a82b83977d39a0f4343183c17e552f3956cfe930 (diff) | |
download | perl-05a54443881edbdd9642c814968256dccb1f4e5f.tar.gz |
cleaner close on tests, take 2
Message-ID: <m33d1tvjuq.fsf@anima.de>
(the DB_File patches)
p4raw-id: //depot/perl@13942
Diffstat (limited to 'ext/DB_File')
-rwxr-xr-x | ext/DB_File/t/db-btree.t | 7 | ||||
-rwxr-xr-x | ext/DB_File/t/db-hash.t | 1 | ||||
-rwxr-xr-x | ext/DB_File/t/db-recno.t | 3 |
3 files changed, 7 insertions, 4 deletions
diff --git a/ext/DB_File/t/db-btree.t b/ext/DB_File/t/db-btree.t index 62cccd706e..ef05de6946 100755 --- a/ext/DB_File/t/db-btree.t +++ b/ext/DB_File/t/db-btree.t @@ -156,6 +156,7 @@ ok(18, $@ =~ /^DB_File::BTREEINFO::FETCH - Unknown element 'fred' at/ ) ; 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 @@ $dbh3->{compare} = sub { length $_[0] <=> length $_[1] } ; 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); diff --git a/ext/DB_File/t/db-hash.t b/ext/DB_File/t/db-hash.t index 81851e16c8..931b03c96a 100755 --- a/ext/DB_File/t/db-hash.t +++ b/ext/DB_File/t/db-hash.t @@ -125,6 +125,7 @@ ok(14, $@ =~ /^DB_File::HASHINFO::FETCH - Unknown element 'fred' at/ ); # 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); diff --git a/ext/DB_File/t/db-recno.t b/ext/DB_File/t/db-recno.t index a676759d07..339baec22c 100755 --- a/ext/DB_File/t/db-recno.t +++ b/ext/DB_File/t/db-recno.t @@ -444,7 +444,7 @@ unlink $Dfile; 1 ; EOM - close FILE ; + close FILE or die "Could not close: $!"; BEGIN { push @INC, '.'; } eval 'use SubDB ; '; @@ -454,6 +454,7 @@ EOM eval ' $X = tie(@h, "SubDB","recno.tmp", O_RDWR|O_CREAT, 0640, $DB_RECNO ); ' ; + die "Could not tie: $!" unless $X; main::ok(68, $@ eq "") ; |