File: db-4.7.t

package info (click to toggle)
libberkeleydb-perl 0.66-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,996 kB
  • sloc: perl: 10,202; ansic: 6,484; makefile: 7
file content (42 lines) | stat: -rw-r--r-- 742 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!./perl -w

use strict ;


use lib 't' ;

use BerkeleyDB;
use util ;

use Test::More ;

plan(skip_all => "this needs Berkeley DB 4.7.x or better\n" )
    if $BerkeleyDB::db_version < 4.7;

plan tests => 7;

my $Dfile = "dbhash.tmp";

umask(0);

{
    my $home = "./fred" ;
    ok my $lexD = new LexDir($home) ;
    chdir "./fred" ;
    ok my $env = new BerkeleyDB::Env -Flags => DB_CREATE|DB_INIT_LOG @StdErrFile;

    ok $env->log_get_config( DB_LOG_AUTO_REMOVE, my $on ) == 0, "get config" ;
    ok !$on, "config value" ;

    ok $env->log_set_config( DB_LOG_AUTO_REMOVE, 1 ) == 0;

    ok $env->log_get_config( DB_LOG_AUTO_REMOVE, $on ) == 0;
    ok $on;

    chdir ".." ;
    undef $env ;
}

# test -Verbose
# test -Flags
# db_value_set