5 |
|
|
6 |
use blib; |
use blib; |
7 |
|
|
8 |
use Test::More tests => 8; |
use Test::More tests => 11; |
9 |
use Test::Exception; |
use Test::Exception; |
10 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
11 |
|
|
15 |
|
|
16 |
cmp_ok( $Search::TokyoDystopia::debug, '==', 0, '$debug' ); |
cmp_ok( $Search::TokyoDystopia::debug, '==', 0, '$debug' ); |
17 |
|
|
18 |
cmp_ok( Search::TokyoDystopia::tcidberrmsg(0), 'eq', 'success', 'tcidberrmsg' ); |
cmp_ok( tcidberrmsg(0), 'eq', 'success', 'tcidberrmsg' ); |
19 |
|
|
20 |
ok( my $db = Search::TokyoDystopia::tcidbnew, 'tcidbnew' ); # FIXME check better |
ok( my $idb = tcidbnew, 'tcidbnew' ); # FIXME check better |
21 |
|
|
22 |
ok( ! Search::TokyoDystopia::tcidbdel( $db ), 'tcidbdel' ); |
ok( ! tcidbdel( $idb ), 'tcidbdel' ); |
23 |
|
|
24 |
ok( $db = Search::TokyoDystopia::tcidbnew, 'tcidbnew again' ); |
ok( $idb = tcidbnew, 'tcidbnew again' ); |
25 |
|
|
26 |
is( Search::TokyoDystopia::tcidbecode( $db ), 0, 'tcidbecode' ); |
is( tcidbecode( $idb ), 0, 'tcidbecode' ); |
27 |
|
|
28 |
is( Search::TokyoDystopia::tcidbtune( $db, 0, 0, 0, 0 ), 1, 'tcidbtune' ); |
ok( tcidbtune( $idb, 0, 0, 0, IDBTLARGE || IDBTDEFLATE ), 'tcidbtune' ); |
29 |
|
|
30 |
|
ok( tcidbsetcache( $idb, 0, 0 ), 'tcidbsetcache' ); |
31 |
|
|
32 |
|
ok( tcidbsetfwmmax( $idb, 0 ), 'tcidbsetfwmmax' ); |
33 |
|
|
34 |
|
my $path = '/tmp/casket'; |
35 |
|
ok( tcidbopen( $idb, $path, IDBOWRITER || IDBOCREAT ), "tcidbopen $path" ); |
36 |
|
|
37 |
|
ok( tcidbclose( $idb ), 'tcidbclose' ); |