first draft of CROSBI gateway
[Biblio-Z3950.git] / t / 6-CROSBI.t
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use Test::More tests => 5;
7
8 my $search = join(' ', @ARGV) || 'denis bratko';
9
10 use_ok 'CROSBI';
11
12 ok( my $o = CROSBI->new(), 'new' );
13
14 ok( my $hits = $o->search( $search ), "search: $search" );
15 like $hits, qr/^\d+$/, "hits: $hits";
16
17 diag "SQL", $o->{sql};
18
19 foreach ( 1 .. $hits ) {
20
21         ok( my $marc = $o->next_marc, "next_marc $_" );
22         diag $marc;
23
24 }