X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2F2-input-isi.t;h=289e8f806d2708160aebf0db275f20908208b02f;hb=db4dde137c6ecf6a38fc3e37a95364999b04ee5a;hp=515614312f58170e0ac45a45a93ef09eadc6c403;hpb=ffad59c82cc74a2e31e019769654163c130ec60c;p=webpac2 diff --git a/t/2-input-isi.t b/t/2-input-isi.t index 5156143..289e8f8 100755 --- a/t/2-input-isi.t +++ b/t/2-input-isi.t @@ -1,9 +1,9 @@ #!/usr/bin/perl -w use strict; -use blib; +use lib 'lib'; -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( exists($rec->{TI}), 'TI' ); cmp_ok($input->pos, '==', $mfn, "pos $mfn");