--- t/10-xs.t 2008/08/17 22:58:23 9 +++ t/10-xs.t 2008/08/17 23:53:11 10 @@ -5,7 +5,7 @@ use blib; -use Test::More tests => 10; +use Test::More tests => 11; use Test::Exception; use Data::Dump qw/dump/; @@ -15,19 +15,22 @@ cmp_ok( $Search::TokyoDystopia::debug, '==', 0, '$debug' ); -cmp_ok( Search::TokyoDystopia::errmsg(0), 'eq', 'success', 'errmsg' ); +cmp_ok( tcidberrmsg(0), 'eq', 'success', 'tcidberrmsg' ); -ok( my $db = Search::TokyoDystopia::new, 'new' ); # FIXME check better +ok( my $idb = tcidbnew, 'tcidbnew' ); # FIXME check better -ok( ! Search::TokyoDystopia::del( $db ), 'del' ); +ok( ! tcidbdel( $idb ), 'tcidbdel' ); -ok( $db = Search::TokyoDystopia::new, 'new again' ); +ok( $idb = tcidbnew, 'tcidbnew again' ); -is( Search::TokyoDystopia::ecode( $db ), 0, 'ecode' ); +is( tcidbecode( $idb ), 0, 'tcidbecode' ); -is( Search::TokyoDystopia::tune( $db, 0, 0, 0, 0 ), 1, 'tune' ); +ok( tcidbtune( $idb, 0, 0, 0, IDBTLARGE || IDBTDEFLATE ), 'tcidbtune' ); -is( Search::TokyoDystopia::setcache( $db, 0, 0 ), 1, 'setcache' ); +ok( tcidbsetcache( $idb, 0, 0 ), 'tcidbsetcache' ); -is( Search::TokyoDystopia::setfwmmax( $db, 0 ), 1, 'setfwmmax' ); +ok( tcidbsetfwmmax( $idb, 0 ), 'tcidbsetfwmmax' ); + +my $path = '/tmp/casket'; +ok( tcidbopen( $idb, $path, IDBOWRITER || IDBOCREAT ), "tcidbopen $path" );