X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2F2-input-isi.t;h=4dc3acaae7722b4be31d43c4f799ac9151b06e8c;hb=b5c19bae10ced3446525c5f40044c05eff872d85;hp=515614312f58170e0ac45a45a93ef09eadc6c403;hpb=ffad59c82cc74a2e31e019769654163c130ec60c;p=webpac2 diff --git a/t/2-input-isi.t b/t/2-input-isi.t index 5156143..4dc3aca 100755 --- a/t/2-input-isi.t +++ b/t/2-input-isi.t @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 9; +use Test::More tests => 12; BEGIN { use_ok( 'WebPAC::Test' ); @@ -20,17 +20,16 @@ ok(my $input = new WebPAC::Input( ), "new"); ok(my $db = $input->open( - path => "$abs_path/data/recs.txt" +# path => "$abs_path/data/recs.txt" + path => "$abs_path/data/isi.txt" ), "open"); ok(my $size = $input->size, "size"); +cmp_ok( $size, '==', 3, 'size ok' ); foreach my $mfn ( 1 ... $size ) { my $rec = $input->fetch; - if ($mfn <= 10 || $mfn == 20) { - ok($rec, "fetch $mfn"); - } else { - ok(! $rec, "empty $mfn"); - } + + ok( $rec->{TI}, 'TI' ); cmp_ok($input->pos, '==', $mfn, "pos $mfn");