/[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 80 by dpavlin, Mon Nov 21 14:42:16 2005 UTC revision 81 by dpavlin, Mon Nov 21 14:42:22 2005 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5  use Test::More tests => 16;  use Test::More tests => 6;
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 26  ok(my $est = new WebPAC::Search::Estraie Line 26  ok(my $est = new WebPAC::Search::Estraie
26  ), "new");  ), "new");
27    
28  my $query = 'ivan';  my $query = 'ivan';
29  my $max = 3;  my $max = 10;
30    
31  ok(my @res = $est->search(  ok(my @res = $est->search(
32          query => $query,          query => $query,
33          max => $max,          max => $max,
34          attr => [ qw/PersonalName/ ],          attr => [ qw/PersonalName TitleProper/ ],
35  ), "search $query, max: $max");  ), "search $query, max: $max");
36    
37  cmp_ok($#res, '==', $max, "$max hits");  cmp_ok(($#res + 1), '==', $max, "$max hits");
38    
39  diag Dumper(\@res);  diag Dumper(\@res);
40    

Legend:
Removed from v.80  
changed lines
  Added in v.81

  ViewVC Help
Powered by ViewVC 1.1.26