projects
/
Biblio-Isis
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- make filehandles locally scoped
[Biblio-Isis]
/
t
/
002_isis.t
diff --git
a/t/002_isis.t
b/t/002_isis.t
index
3b93a0a
..
ec2d510
100755
(executable)
--- a/
t/002_isis.t
+++ b/
t/002_isis.t
@@
-9,6
+9,7
@@
use Test::More tests => 110;
BEGIN { use_ok( 'IsisDB' ); }
BEGIN { use_ok( 'IsisDB' ); }
+my $debug = shift @ARGV;
my $isis;
sub test_data {
my $isis;
sub test_data {
@@
-17,7
+18,7
@@
sub test_data {
isa_ok ($isis, 'IsisDB');
isa_ok ($isis, 'IsisDB');
- cmp_ok($isis->
{maxmfn}, '==', 5, "maxmfn set to
5");
+ cmp_ok($isis->
count, '==', 5, "count is
5");
# test .CNT data
# test .CNT data
@@
-92,7
+93,7
@@
sub test_data {
'200' => [ '1#^aPsychology^fCamille B. Wortman, Elizabeth F. Loftus, Mary E. Marshal' ],
} ];
'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");
my $rec;
ok($rec = $isis->fetch($mfn), "fetch $mfn");
@@
-113,7
+114,7
@@
sub test_data {
skip "no Digest::MD5 module", 5 if ($@);
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");
}
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,
$isis = IsisDB->new (
isisdb => './data/winisis/BIBL',
include_deleted => 1,
+ debug => $debug,
);
print Dumper($isis);
);
print Dumper($isis);
@@
-166,6
+168,7
@@
cmp_ok($isis->{deleted}, '==', 3, "MFN 3 is deleted");
$isis = IsisDB->new (
isisdb => './data/winisis/BIBL',
$isis = IsisDB->new (
isisdb => './data/winisis/BIBL',
+ debug => $debug,
);
ok(! $isis->fetch(3), "deleted not found");
);
ok(! $isis->fetch(3), "deleted not found");