two different crosbi databases searching different tables
[Biblio-Z3950.git] / t / 6-CROSBI.t
index 42a3c47..4f2f1df 100755 (executable)
@@ -11,14 +11,19 @@ use_ok 'CROSBI';
 
 ok( my $o = CROSBI->new(), 'new' );
 
+foreach my $database ( qw( CROSBI-CASOPIS CROSBI-PREPRINT ) ) {
+       diag $o->{database} = $database;
+
 ok( my $hits = $o->search( $search ), "search: $search" );
 like $hits, qr/^\d+$/, "hits: $hits";
 
 diag "SQL", $o->{sql};
 
-foreach ( 1 .. 3 ) {
+foreach ( 1 .. $hits ) {
 
        ok( my $marc = $o->next_marc, "next_marc $_" );
        diag $marc;
 
 }
+
+} # database