X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2F2-input-isi.t;h=c98774952c46cec31c9a433148577656c6d63f7c;hb=33156dfb36756fcafdf27a56b3254344aab06d09;hp=6e0e1c40d6c95bc4bb584e89f52f93c2982969b6;hpb=fd1e07b1d85fed9081776e565af0ed580b8f33b9;p=webpac2 diff --git a/t/2-input-isi.t b/t/2-input-isi.t index 6e0e1c4..c987749 100755 --- a/t/2-input-isi.t +++ b/t/2-input-isi.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use blib; +use lib 'lib'; use Test::More tests => 12; @@ -20,19 +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, '==', 2, 'size ok' ); +cmp_ok( $size, '==', 3, 'size ok' ); foreach my $mfn ( 1 ... $size ) { my $rec = $input->fetch; - if ($mfn <= 10 || $mfn == 20) { - ok($rec, "fetch $mfn"); - cmp_ok($rec->{'000'}->[0], '==', $mfn, 'has mfn'); - } else { - ok(! $rec, "empty $mfn"); - } + + ok( $rec->{TI}, 'TI' ); cmp_ok($input->pos, '==', $mfn, "pos $mfn");