/[Search-TokyoDystopia]/t/10-tci.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /t/10-tci.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26