/[webpac2]/trunk/t/7-est.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/7-est.t

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

revision 266 by dpavlin, Fri Dec 16 16:23:49 2005 UTC revision 302 by dpavlin, Mon Dec 19 21:35:37 2005 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5  use Test::More tests => 11;  use Test::More tests => 12;
6  use Test::Exception;  use Test::Exception;
7  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
8  use File::Temp qw/tempdir/;  use File::Temp qw/tempdir/;
# Line 54  my $ds = { Line 54  my $ds = {
54    
55  ok($est->add( id => 42, ds => $ds, type => 'search' ), "add");  ok($est->add( id => 42, ds => $ds, type => 'search' ), "add");
56    
57  ok($est = new WebPAC::Search::Estraier( %{ $config } ), "new WebPAC::Search::Estraier");  ok(my $est_s = new WebPAC::Search::Estraier( %{ $config } ), "new WebPAC::Search::Estraier");
58    
59  my $query = 'demo';  my $query = 'demo';
60  my $max = 1;  my $max = 1;
61    
62  ok(my @res = $est->search(  ok(my @res = $est_s->search(
63          phrase => $query,          phrase => $query,
64          get_attr => [ qw/ID Source/ ],          get_attr => [ qw/ID Source/ ],
65          max => $max,          max => $max,
# Line 69  cmp_ok(($#res + 1), '==', $max, "$max hi Line 69  cmp_ok(($#res + 1), '==', $max, "$max hi
69    
70  diag Dumper(\@res);  diag Dumper(\@res);
71    
72    ok($est->master( action => 'nodedel', name => 'webpac2test' ), "nodedel");
73    

Legend:
Removed from v.266  
changed lines
  Added in v.302

  ViewVC Help
Powered by ViewVC 1.1.26