From: Paul Marquess Date: Thu, 8 Nov 2001 22:52:50 +0000 (+0000) Subject: RE: Win2k / Cygwin-1.3.3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a109f988838e035e38e7263f74120ba65bf7bd0d;p=p5sagit%2Fp5-mst-13.2.git RE: Win2k / Cygwin-1.3.3 Message-ID: p4raw-id: //depot/perl@12905 --- diff --git a/ext/DB_File/t/db-recno.t b/ext/DB_File/t/db-recno.t index 748bedf..8f42ce3 100755 --- a/ext/DB_File/t/db-recno.t +++ b/ext/DB_File/t/db-recno.t @@ -1061,13 +1061,14 @@ sub test_splice { my @array = @$array; my @list = @$list; - open(TEXT, ">$tmp") or die "cannot write to $tmp: $!"; - foreach (@array) { print TEXT "$_\n" } - close TEXT or die "cannot close $tmp: $!"; + unlink $tmp; my @h; - my $H = tie @h, 'DB_File', $tmp, O_RDWR, 0644, $DB_RECNO + my $H = tie @h, 'DB_File', $tmp, O_CREAT|O_RDWR, 0644, $DB_RECNO or die "cannot open $tmp: $!"; + + my $i = 0; + foreach ( @array ) { $h[$i++] = $_ } return "basic DB_File sanity check failed" if list_diff(\@array, \@h);