2 |
|
|
3 |
use strict; |
use strict; |
4 |
|
|
5 |
use Test::More tests => 4; |
use Test::More tests => 5; |
6 |
use Test::Exception; |
use Test::Exception; |
7 |
use blib; |
use blib; |
8 |
|
|
12 |
|
|
13 |
my $i; |
my $i; |
14 |
|
|
15 |
throws_ok { SWISH::PlusPlus->new() } qr/index/, "need index"; |
throws_ok { SWISH::PlusPlus->open() } qr/index_dir/, "need index_dir"; |
16 |
|
|
17 |
## FIXME |
## FIXME |
18 |
my $index = '/tmp/swish-pp'; |
my $index = '/tmp/swish-pp'; |
19 |
|
|
20 |
ok($i = new SWISH::PlusPlus( index=> $index ), "new"); |
$i = SWISH::PlusPlus->open( |
21 |
|
index_dir => $index, |
22 |
|
); |
23 |
|
ok($i, "open index"); |
24 |
|
|
25 |
ok(-e $index, "index exist"); |
ok(-e $index, "index exist"); |
26 |
|
|
27 |
|
ok($i->check_bin, "swish++ check"); |
28 |
|
|
29 |
|
diag $i->{'version'} || die; |