[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

test 65 in perl5.004.05/t/lib/db-btree.t



-----BEGIN PGP SIGNED MESSAGE-----

I've gone through and commented out the four tests that I found in the
test suite that test for empty keys.

Unfortunately, test 65 in lib/db-btree.t doesn't look like it's testing
for an empty key but is still failing.  I just don't know enough about
advanced DB_File to know what's wrong.  I've commented it out for now
but this worries me.

An except is here:
#!./perl -w

BEGIN {
    @INC = '../lib' if -d '../lib' ;
    require Config; import Config;
    if ($Config{'extensions'} !~ /\bDB_File\b/) {
        print "1..0\n";
        exit 0;
    }
}

use DB_File;
use Fcntl;

sub ok
{
    my $no = shift ;
    my $result = shift ;
    print "not " unless $result ;
    print "ok $no\n" ;
}

$Dfile = "dbbtree.tmp";
unlink $Dfile;

ok(19, $X = tie(%h, 'DB_File',$Dfile, O_RDWR|O_CREAT, 0640, $DB_BTREE )) ;

$h{'y'} = 'Y';

$key = 'y' ;
$value = '' ;
$status = $X->seq($key, $value, R_CURSOR) ;
ok(59, $status == 0 );
ok(60, $key eq 'y' );
ok(61, $value eq 'Y' );

$key = "replace key" ;
$value = "replace value" ;
$status = $X->put($key, $value, R_CURSOR) ;
ok(62, $status == 0 );
ok(63, $key eq 'replace key' );
ok(64, $value eq 'replace value' );
$status = $X->get('y', $value) ;
ok(65, $status == 1 );

- -- 
<torin@daft.com> <http://www.daft.com/~torin> <torin@debian.org> <torin@io.com>
Darren Stalder/2608 Second Ave, @282/Seattle, WA 98121-1212/USA/+1-800-921-4996
@ Sysadmin, webweaver, postmaster for hire. C/Perl/CGI/Pilot programmer/tutor @
@		     Make a little hot-tub in your soul.		      @

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: noconv
Comment: Processed by Mailcrypt 3.5.1, an Emacs/PGP interface

iQCVAwUBN2kNX44wrq++1Ls5AQG3cQP/fuxw/WS7KgLJoyUxmQ1TODK3C0J47xna
BXQzF67vIFrv+xhCGRZGaHK7J+d8k7Agi+OeDWZMox3IE9x7kKc51wgjdD06aJ1j
rTZNwum5Mj/ZFHFRSB8pWQhjhbO+BM7/swwe2Spn1RjnYfKiH4KJjz6iY2NZLix6
d/y+WmOem9Y=
=gZh7
-----END PGP SIGNATURE-----


Reply to: