summaryrefslogtreecommitdiff
path: root/ext/SDBM_File
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-12-16 11:37:43 +0000
committerNicholas Clark <nick@ccl4.org>2010-12-16 14:51:53 +0000
commit89cebecca5600bb94e404ffac30bb2fa04e516c3 (patch)
tree3865c895d1996d1a2684c0c4be87ec0f119bddde /ext/SDBM_File
parent234e7be97d3fcde19aeeb0d1a009880870e75aa5 (diff)
downloadperl-89cebecca5600bb94e404ffac30bb2fa04e516c3.tar.gz
Converge ext/[GNOS]DBM_File/t/[gnos]dbm.t by using the same filename.
Choose the 1 dot form used by sdbm.t, to keep VMS happy. Also, propagate into ndbm.t the part of the test for 20001013.009 that cbc5248d01a71061 missed. Move the exist tests from f4b9d8806d76b352 earlier in sdbm.t, to increase consistency - the alternative attempts to have 2 DBM files open simultaneously, which ODBM_File doesn't support. (Implied TODO: add an explicit test for this to the other 3.)
Diffstat (limited to 'ext/SDBM_File')
-rw-r--r--ext/SDBM_File/t/sdbm.t13
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/SDBM_File/t/sdbm.t b/ext/SDBM_File/t/sdbm.t
index 3af6a583ce..0496ad261c 100644
--- a/ext/SDBM_File/t/sdbm.t
+++ b/ext/SDBM_File/t/sdbm.t
@@ -27,7 +27,7 @@ isa_ok(tie(%h, 'SDBM_File', 'Op_dbmx', O_RDWR|O_CREAT, 0640), 'SDBM_File');
my $Dfile = "Op_dbmx.pag";
if (! -e $Dfile) {
- ($Dfile) = <Op_dbmx.*>;
+ ($Dfile) = <Op_dbmx*>;
}
SKIP: {
skip "different file permission semantics on $^O", 1
@@ -124,6 +124,11 @@ is(join(':',200..400), join(':',@foo));
is($h{'foo'}, '');
is($h{''}, 'bar');
+is(exists $h{goner1}, '');
+is(exists $h{foo}, 1);
+
+untie %h;
+unlink <Op_dbmx*>, $Dfile;
{
# sub-class test
@@ -171,6 +176,7 @@ EOM
close FILE or die "Could not close: $!";
BEGIN { push @INC, '.'; }
+ unlink <dbhash_tmp*> ;
eval 'use SubDB ; use Fcntl ;';
main::is($@, "");
@@ -196,9 +202,6 @@ EOM
}
-is(exists $h{goner1}, '');
-is(exists $h{foo}, 1);
-
untie %h;
unlink <Op_dbmx*>, $Dfile;
@@ -398,7 +401,7 @@ unlink <Op_dbmx*>, $Dfile;
my %h ;
my $a = "";
local $SIG{__WARN__} = sub {$a = $_[0]} ;
-
+
isa_ok(tie(%h, 'SDBM_File', 'Op_dbmx', O_RDWR|O_CREAT, 0640), 'SDBM_File');
$h{ABC} = undef;
is($a, "");