|
Revision 2112, 447 bytes
(checked in by karpet, 5 months ago)
|
make output a little more swish-like
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
use Carp; |
|---|
| 4 |
use Test::More tests => 4; |
|---|
| 5 |
|
|---|
| 6 |
ok( run(''), 'usage' ); |
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
ok( run(' ../test_docs/*xml'), 'index xml' ); |
|---|
| 10 |
ok( run(' ../test_docs/*html'), 'index html' ); |
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
ok( ( grep {m/2 estimated matches/} run(' --query swishtitle:foobar') ), |
|---|
| 14 |
'search swishtitle:foobar' ); |
|---|
| 15 |
|
|---|
| 16 |
sub run { |
|---|
| 17 |
my $cmd = shift; |
|---|
| 18 |
my @out = `./swish_xapian $cmd`; |
|---|
| 19 |
if ($?) { |
|---|
| 20 |
croak "$cmd failed: $!"; |
|---|
| 21 |
} |
|---|
| 22 |
return @out; |
|---|
| 23 |
} |
|---|