projects
/
Biblio-Z3950.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
we need english stemmer because remote database is configured wrong
[Biblio-Z3950.git]
/
t
/
6-CROSBI.t
diff --git
a/t/6-CROSBI.t
b/t/6-CROSBI.t
index
6f5ca74
..
2a01ef6
100755
(executable)
--- a/
t/6-CROSBI.t
+++ b/
t/6-CROSBI.t
@@
-3,22
+3,30
@@
use warnings;
use strict;
use warnings;
use strict;
-use Test::More tests =>
5
;
+use Test::More tests =>
21
;
-my $search = join(' ', @ARGV) || 'denis bratko';
+my $search = join(' ', @ARGV) || '
fti_au:
denis bratko';
use_ok 'CROSBI';
ok( my $o = CROSBI->new(), 'new' );
use_ok 'CROSBI';
ok( my $o = CROSBI->new(), 'new' );
+foreach my $database ( qw( CROSBI-CASOPIS CROSBI-PREPRINT CROSBI-RKNJIGA CROSBI-ZBORNIK ) ) {
+ diag $o->{database} = $database;
+
ok( my $hits = $o->search( $search ), "search: $search" );
like $hits, qr/^\d+$/, "hits: $hits";
diag "SQL", $o->{sql};
ok( my $hits = $o->search( $search ), "search: $search" );
like $hits, qr/^\d+$/, "hits: $hits";
diag "SQL", $o->{sql};
+$hits = 3 if $hits > 3 && ! $ENV{DEBUG};
+
foreach ( 1 .. $hits ) {
foreach ( 1 .. $hits ) {
- ok( my $marc = $o->next_marc, "next_marc $_" );
+ ok( my $marc = $o->next_marc, "next_marc $
o->{database} $
_" );
diag $marc;
}
diag $marc;
}
+
+} # database
+