/[SWISH-PlusPlus]/trunk/t/01swish.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 /trunk/t/01swish.t

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

revision 7 by dpavlin, Fri Dec 3 23:30:22 2004 UTC revision 8 by dpavlin, Sat Dec 4 17:49:20 2004 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5  use Test::More tests => 8;  use Test::More tests => 11;
6  use Test::Exception;  use Test::Exception;
7  use blib;  use blib;
8    
# Line 19  my $index = '/tmp/swish-pp'; Line 19  my $index = '/tmp/swish-pp';
19    
20  $i = SWISH::PlusPlus->open(  $i = SWISH::PlusPlus->open(
21          index_dir => $index,          index_dir => $index,
22            debug => 0,
23  );  );
24  ok($i, "open index");  ok($i, "open index");
25    
# Line 35  ok($i->index_document( 42 => 'meaning of Line 36  ok($i->index_document( 42 => 'meaning of
36  ok($i->index_document( _dummy_ => '' ), "fillter");  ok($i->index_document( _dummy_ => '' ), "fillter");
37    
38  cmp_ok($i->{'index_dir'}, 'eq', $index, "index_dir ok");  cmp_ok($i->{'index_dir'}, 'eq', $index, "index_dir ok");
39    
40    foreach my $word (qw(meaning of life)) {
41            my @r = $i->search($word);
42            cmp_ok(scalar @r, '==', 1, "find $word");
43    }

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26