summaryrefslogtreecommitdiff
path: root/ext/DB_File
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>2001-11-08 22:52:50 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-08 21:51:51 +0000
commita109f988838e035e38e7263f74120ba65bf7bd0d (patch)
tree0cadafcf629ea0a8e0ab02f296023c51e48b80d9 /ext/DB_File
parent8b731da2c33117cac0e5992c0f888f85a1f64ba7 (diff)
downloadperl-a109f988838e035e38e7263f74120ba65bf7bd0d.tar.gz
RE: Win2k / Cygwin-1.3.3
Message-ID: <AIEAJICLCBDNAAOLLOKLKEHNDEAA.Paul_Marquess@Yahoo.co.uk> p4raw-id: //depot/perl@12905
Diffstat (limited to 'ext/DB_File')
-rwxr-xr-xext/DB_File/t/db-recno.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/DB_File/t/db-recno.t b/ext/DB_File/t/db-recno.t
index 748bedf690..8f42ce3923 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);