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

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

revision 11 by dpavlin, Sun Dec 5 13:30:57 2004 UTC revision 14 by dpavlin, Sun Dec 5 15:35:53 2004 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5  use Test::More tests => 27;  use Test::More tests => 29;
6  use Test::Exception;  use Test::Exception;
7  use lib '.';  use lib '.';
8  use blib;  use blib;
# Line 27  ok($i, "open index"); Line 27  ok($i, "open index");
27    
28  ok(-e $index, "index exist");  ok(-e $index, "index exist");
29    
30    ok($i->{'cwd'}, "cwd ".$i->{'cwd'});
31    
32  ok($i->check_bin, "swish++ check");  ok($i->check_bin, "swish++ check");
33    
34  diag $i->{'version'} || die;  ok($i->{'version'}, "version ".$i->{'version'});
35    
36  ok($i->index_document( 42 => 'meaning of life' ), "index 42");  ok($i->index_document( 42 => 'meaning of life' ), "index 42");
37    
# Line 50  ok($i->index_document( _dummy_ => '' ), Line 52  ok($i->index_document( _dummy_ => '' ),
52    
53  cmp_ok($i->{'index_dir'}, 'eq', $index, "index_dir ok");  cmp_ok($i->{'index_dir'}, 'eq', $index, "index_dir ok");
54    
55    # I would rather test search to close it itself!
56    #$i->finish_update;
57    
58  foreach my $word (qw(meaning of life)) {  foreach my $word (qw(meaning of life)) {
59          my @r = $i->search($word);          my @r = $i->search($word);
60          cmp_ok(scalar @r, '==', 1, "find $word");          cmp_ok(scalar @r, '==', 1, "find $word");

Legend:
Removed from v.11  
changed lines
  Added in v.14

  ViewVC Help
Powered by ViewVC 1.1.26