+ # test fetch
+
+ my $data = [ {
+ '801' => [ '^aFFZG' ],
+ '702' => [ '^aHolder^bElizabeth' ],
+ '990' => [ '2140', '88', 'HAY' ],
+ '675' => [ '^a159.9' ],
+ '210' => [ '^aNew York^cNew York University press^dcop. 1988' ],
+ }, {
+ '210' => [ '^aNew York^cUniversity press^d1989' ],
+ '700' => [ '^aFrosh^bStephen' ],
+ '990' => [ '2140', '89', 'FRO' ],
+ '200' => [ '^aPsychoanalysis and psychology^eminding the gap^fStephen Frosh' ],
+ '215' => [ '^aIX, 275 str.^d23 cm' ],
+ }, {
+ '210' => [ '^aLondon^cFree Associoation Books^d1992' ],
+ '700' => [ '^aTurkle^bShirlie' ],
+ '990' => [ '2140', '92', 'LAC' ],
+ '200' => [ '^aPsychoanalitic politics^eJacques Lacan and Freud\'s French Revolution^fSherry Turkle' ],
+ '686' => [ '^a2140', '^a2140' ],
+
+ }, {
+ '700' => [ '^aGross^bRichard' ],
+ '200' => [ '^aKey studies in psychology^fRichard D. Gross' ],
+ '210' => [ '^aLondon^cHodder & Stoughton^d1994' ],
+ '10' => [ '^a0-340-59691-0' ],
+ }, {
+ # identifier test
+ '225' => [ '1#^aMcGraw-Hill series in Psychology' ],
+ '200' => [ '1#^aPsychology^fCamille B. Wortman, Elizabeth F. Loftus, Mary E. Marshal' ],
+ } ];
+
+ foreach my $mfn (1 .. $isis->count) {
+
+ diag "row: ",Dumper( $data->[$mfn-1] );
+
+ my $rec;
+ ok($rec = $isis->fetch($mfn), "fetch $mfn");
+
+ foreach my $f (keys %{$data->[$mfn-1]}) {
+ my $i = 0;
+ foreach my $v (@{$data->[$mfn-1]->{$f}}) {
+ $v =~ s/^[01# ][01# ]// if ($args->{no_ident});
+ cmp_ok($v, 'eq', $rec->{$f}->[$i], "MFN $mfn $f:$i $v");
+ $i++;
+ }
+ }
+ }
+
+ # test to_ascii
+
+ SKIP: {
+ eval "use Digest::MD5 qw(md5_hex)";
+
+ skip "no Digest::MD5 module", 5 if ($@);
+
+ 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");
+ }
+ }
+