AnyDBM_File.t revision 1
2N/A# $RCSfile: dbm.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:43 $ 2N/A chdir 't' if -d 't'; 2N/A $^O eq 'NetWare' || $^O eq 'dos' || 2N/A skip( "different file permission semantics",1) 2N/A ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, 2N/A ok(($mode & 0777) == ($^O eq 'vos' ? 0750 : 0640) , "File permissions"); ok(!$i,"Hash created empty");
$h{
'jkl',
'mno'} =
"JKL\034MNO";
$h{
'a',
2,
3,
4,
5} =
join("\034",'A',2,3,4,5);
ok($i == 30,"keys and values match");
ok($#keys == 31,"Correct number of keys");
# check cache overflow and numeric keys and contents for ($i = 1; $i < 200; $i++) { $h{$i + 0} = $i + 0; } for ($i = 1; $i < 200; $i++) { $ok = 0 unless $h{$i} == $i; } ok($ok, "cache overflow and numeric keys and contents");
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, ok($h{'foo'} eq '', "empty value");
# anydbm.t test 12 will fail when AnyDBM_File uses the combination of # DB_File and Berkeley DB 2.4.10 (or greater). # You are using DB_File $DB_File::VERSION and Berkeley DB $compact # Berkeley DB 2 from version 2.4.10 onwards does not allow null keys. # This feature returned with version 3.1 ok($h{''} eq 'bar','null key');