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

Contents of /trunk/t/01swish.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (show annotations)
Fri Dec 3 23:30:22 2004 UTC (19 years, 6 months ago) by dpavlin
Original Path: trunk/t/swish.t
File MIME type: application/x-troff
File size: 696 byte(s)
sanity test

1 #!/usr/bin/perl -w
2
3 use strict;
4
5 use Test::More tests => 8;
6 use Test::Exception;
7 use blib;
8
9 BEGIN {
10 use_ok('SWISH::PlusPlus')
11 };
12
13 my $i;
14
15 throws_ok { SWISH::PlusPlus->open() } qr/index_dir/, "need index_dir";
16
17 ## FIXME
18 my $index = '/tmp/swish-pp';
19
20 $i = SWISH::PlusPlus->open(
21 index_dir => $index,
22 );
23 ok($i, "open index");
24
25 ok(-e $index, "index exist");
26
27 ok($i->check_bin, "swish++ check");
28
29 diag $i->{'version'} || die;
30
31 ok($i->index_document( 42 => 'meaning of life' ), "index 42");
32
33 # add one dummy document so that swish++ won't reject all words
34 # with index of just one document
35 ok($i->index_document( _dummy_ => '' ), "fillter");
36
37 cmp_ok($i->{'index_dir'}, 'eq', $index, "index_dir ok");

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26