summaryrefslogtreecommitdiff
path: root/t/op/dbm.t
diff options
context:
space:
mode:
authorLarry Wall <larry@netlabs.com>1993-11-10 00:00:00 +0000
committerLarry Wall <larry@netlabs.com>1993-11-10 00:00:00 +0000
commit463ee0b2acbd047c27e8b5393cdd8398881824c5 (patch)
treeae17d9179fc861ae5fc5a86da9139631530cb6fe /t/op/dbm.t
parent93a17b20b6d176db3f04f51a63b0a781e5ffd11c (diff)
downloadperl-463ee0b2acbd047c27e8b5393cdd8398881824c5.tar.gz
perl 5.0 alpha 4
[editor's note: the sparc executables have not been included, and emacs backup files have been removed. This was reconstructed from a tarball found on the September 1994 InfoMagic CD; the date of this is approximate]
Diffstat (limited to 't/op/dbm.t')
-rwxr-xr-xt/op/dbm.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/op/dbm.t b/t/op/dbm.t
index f09ca4febf..a011169865 100755
--- a/t/op/dbm.t
+++ b/t/op/dbm.t
@@ -10,11 +10,13 @@ if (!-r '/usr/include/dbm.h' && !-r '/usr/include/ndbm.h'
print "1..12\n";
+init SDBM_File;
+
unlink <Op.dbmx.*>;
unlink Op.dbmx; # in case we're running gdbm
umask(0);
-print (dbmopen(h,'Op.dbmx',0640) ? "ok 1\n" : "not ok 1\n");
+print (tie(%h,SDBM_File,'Op.dbmx', 0x202, 0640) ? "ok 1\n" : "not ok 1\n");
$Dfile = "Op.dbmx.pag";
if (! -e $Dfile) {
@@ -24,7 +26,7 @@ if (! -e $Dfile) {
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,
$blksize,$blocks) = stat($Dfile);
print (($mode & 0777) == 0640 ? "ok 2\n" : "not ok 2\n");
-while (($key,$value) = each(h)) {
+while (($key,$value) = each(%h)) {
$i++;
}
print (!$i ? "ok 3\n" : "not ok 3\n");
@@ -48,8 +50,8 @@ $h{'i'} = 'I';
$h{'goner2'} = 'snork';
delete $h{'goner2'};
-dbmclose(h);
-print (dbmopen(h,'Op.dbmx',0640) ? "ok 4\n" : "not ok 4\n");
+untie(%h);
+print (tie(%h,SDBM_File,'Op.dbmx', 0x2, 0640) ? "ok 4\n" : "not ok 4\n");
$h{'j'} = 'J';
$h{'k'} = 'K';