dslinux/user/perl/ext/DB_File/t db-btree.t db-hash.t db-recno.t
cayenne
dslinux_cayenne at user.in-berlin.de
Mon Dec 4 17:59:11 CET 2006
Update of /cvsroot/dslinux/dslinux/user/perl/ext/DB_File/t
In directory antilope:/tmp/cvs-serv17422/ext/DB_File/t
Added Files:
db-btree.t db-hash.t db-recno.t
Log Message:
Adding fresh perl source to HEAD to branch from
--- NEW FILE: db-hash.t ---
#!./perl
BEGIN {
unless(grep /blib/, @INC) {
chdir 't' if -d 't';
@INC = '../lib' if -d '../lib';
}
}
use warnings;
use strict;
use Config;
BEGIN {
if(-d "lib" && -f "TEST") {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
}
[...1193 lines suppressed...]
$remember{$key} eq $value) {
delete $remember{$key} ;
}
else {
$bad{$key} = $value ;
}
}
ok 164, $_ eq 'fred';
ok 165, keys %bad == 0 ;
ok 166, keys %remember == 0 ;
print "# missing -- $key $value\n" while ($key, $value) = each %remember;
print "# bad -- $key $value\n" while ($key, $value) = each %bad;
undef $db ;
untie %h;
unlink $Dfile;
}
exit ;
--- NEW FILE: db-recno.t ---
#!./perl -w
BEGIN {
unless(grep /blib/, @INC) {
chdir 't' if -d 't';
@INC = '../lib' if -d '../lib';
}
}
use warnings;
use strict;
use Config;
BEGIN {
if(-d "lib" && -f "TEST") {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
}
[...1564 lines suppressed...]
my @r;
while (rand() > 0.1 * (scalar @r + 1)) {
push @r, rand_word();
}
return \@r;
}
sub rand_word {
die 'usage: rand_word()' if @_;
my $r = '';
my @chars = qw<a b c d e f g h i j k l m n o p q r s t u v w x y z>;
while (rand() > 0.1 * (length($r) + 1)) {
$r .= $chars[int(rand(scalar @chars))];
}
return $r;
}
--- NEW FILE: db-btree.t ---
#!./perl -w
BEGIN {
unless(grep /blib/, @INC) {
chdir 't' if -d 't';
@INC = '../lib' if -d '../lib';
}
}
use warnings;
use strict;
use Config;
BEGIN {
if(-d "lib" && -f "TEST") {
if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
print "1..0 # Skip: DB_File was not built\n";
exit 0;
}
[...1625 lines suppressed...]
$warned = '';
$db->put(undef, $value) ;
ok 195, $warned eq ''
or print "# Caught warning [$warned]\n" ;
$warned = '';
my $no_NULL = ($DB_File::db_ver >= 2.003016 && $DB_File::db_ver < 3.001) ;
print "# db_ver $DB_File::db_ver\n";
$value = '' ;
$db->get(undef, $value) ;
ok 196, $no_NULL || $value eq 'fred' or print "# got [$value]\n" ;
ok 197, $warned eq ''
or print "# Caught warning [$warned]\n" ;
$warned = '';
undef $db ;
untie %h;
unlink $Dfile;
}
exit ;
More information about the dslinux-commit
mailing list