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/; |
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, |
69 |
|
|
70 |
diag Dumper(\@res); |
diag Dumper(\@res); |
71 |
|
|
72 |
|
ok($est->master( action => 'nodedel', name => 'webpac2test' ), "nodedel"); |
73 |
|
|