Changeset 1183
- Timestamp:
- 07/29/06 19:51:38
- Files:
-
- trunk/plagger/lib/Plagger/Plugin/Search/KinoSearch.pm (modified) (1 diff)
- trunk/plagger/t/plugins/Search-KinoSearch/search.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plagger/lib/Plagger/Plugin/Search/KinoSearch.pm
r1177 r1183 26 26 $self->{indexer} = KinoSearch::InvIndexer->new( 27 27 invindex => $self->conf->{invindex}, 28 create => 1,28 create => !-e $self->conf->{invindex}, 29 29 analyzer => $self->{analyzer}, 30 30 ); trunk/plagger/t/plugins/Search-KinoSearch/search.t
r1177 r1183 9 9 our $dir = File::Spec->catfile($FindBin::Bin, 'invindex'); 10 10 11 plan tests => 5;11 plan tests => 8; 12 12 run_eval_expected; 13 13 … … 47 47 is $feed->count, 0, 'No match'; 48 48 49 === Second run ... make sure it's not clobbered 50 --- input config 51 global: 52 log: 53 level: error 54 plugins: 55 - module: Subscription::Config 56 config: 57 feed: 58 - file:///$FindBin::Bin/../../samples/rss-full.xml 59 - module: Search::KinoSearch 60 config: 61 invindex: $main::dir 62 --- expected 63 ok -e $main::dir, 'invindex exists'; 64 65 # xxx this is clumsy 66 no warnings 'redefine'; 67 *Plagger::context = sub { $context }; 68 69 my $feed; 70 $context->run_hook('searcher.search', { query => "murakami" }, 0, sub { $feed = $_[0] }); 71 ok $feed, 'I still got feed'; 72 is $feed->count, 1, 'murakami matches 1'; 73
