From: Rafael Garcia-Suarez Date: Tue, 20 Jan 2004 20:26:18 +0000 (+0000) Subject: Fix precedence errors and add some cleanup in the new X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9aedf6d8e83e13ae89ffc7703fb74a4ce8e37fc1;p=p5sagit%2Fp5-mst-13.2.git Fix precedence errors and add some cleanup in the new DBM_Filter tests p4raw-id: //depot/perl@22183 --- diff --git a/lib/DBM_Filter/t/01error.t b/lib/DBM_Filter/t/01error.t index 4ebbfd8..f66030a 100644 --- a/lib/DBM_Filter/t/01error.t +++ b/lib/DBM_Filter/t/01error.t @@ -11,15 +11,17 @@ our $db ; if ( ! -d 'DBM_Filter') { mkdir 'DBM_Filter', 0777 - || die "Cannot create directory 'DBM_Filter': $!\n" ; + or die "Cannot create directory 'DBM_Filter': $!\n" ; } } +END { rmdir 'DBM_Filter' } + sub writeFile { my $filename = shift ; my $content = shift; - open F, ">$filename" || croak "Cannot open $filename: $!" ; + open F, ">$filename" or croak "Cannot open $filename: $!" ; print F $content ; close F; } diff --git a/lib/DBM_Filter/t/02core.t b/lib/DBM_Filter/t/02core.t index fe1dc8c..77a6a6c 100644 --- a/lib/DBM_Filter/t/02core.t +++ b/lib/DBM_Filter/t/02core.t @@ -12,16 +12,17 @@ use lib '.'; if ( ! -d 'DBM_Filter') { mkdir 'DBM_Filter', 0777 - || die "Cannot create directory 'DBM_Filter': $!\n" ; + or die "Cannot create directory 'DBM_Filter': $!\n" ; } } +END { rmdir 'DBM_Filter' } sub writeFile { my $filename = shift ; my $content = shift; - open F, ">DBM_Filter/$filename.pm" || croak "Cannot open $filename: $!" ; + open F, ">DBM_Filter/$filename.pm" or croak "Cannot open $filename: $!" ; print F $content ; close F; $files{"DBM_Filter/$filename.pm"} ++;