X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;ds=sidebyside;f=t%2F002_isis.t;h=ec2d510a62f89c1e52522fb7aaff2f31d440fce2;hb=5a6197e3a595e08faff9a7f4a139a982e73b4b89;hp=3b93a0a22626222cea0a78168d84c237d1789c8e;hpb=f58359f302818beabc46911611776b1d8a1d7e77;p=Biblio-Isis diff --git a/t/002_isis.t b/t/002_isis.t index 3b93a0a..ec2d510 100755 --- a/t/002_isis.t +++ b/t/002_isis.t @@ -9,6 +9,7 @@ use Test::More tests => 110; BEGIN { use_ok( 'IsisDB' ); } +my $debug = shift @ARGV; my $isis; sub test_data { @@ -17,7 +18,7 @@ sub test_data { isa_ok ($isis, 'IsisDB'); - cmp_ok($isis->{maxmfn}, '==', 5, "maxmfn set to 5"); + cmp_ok($isis->count, '==', 5, "count is 5"); # test .CNT data @@ -92,7 +93,7 @@ sub test_data { '200' => [ '1#^aPsychology^fCamille B. Wortman, Elizabeth F. Loftus, Mary E. Marshal' ], } ]; - foreach my $mfn (1 .. $isis->{'maxmfn'}) { + foreach my $mfn (1 .. $isis->count) { my $rec; ok($rec = $isis->fetch($mfn), "fetch $mfn"); @@ -113,7 +114,7 @@ sub test_data { skip "no Digest::MD5 module", 5 if ($@); - foreach my $mfn (1 .. $isis->{'maxmfn'}) { + foreach my $mfn (1 .. $isis->count) { my $md5 = md5_hex($isis->to_ascii($mfn)); cmp_ok($md5, 'eq', $args->{md5_ascii}[$mfn - 1], "md5 $mfn"); } @@ -124,6 +125,7 @@ sub test_data { $isis = IsisDB->new ( isisdb => './data/winisis/BIBL', include_deleted => 1, + debug => $debug, ); print Dumper($isis); @@ -166,6 +168,7 @@ cmp_ok($isis->{deleted}, '==', 3, "MFN 3 is deleted"); $isis = IsisDB->new ( isisdb => './data/winisis/BIBL', + debug => $debug, ); ok(! $isis->fetch(3), "deleted not found");