X-Git-Url: http://git.rot13.org/?p=Biblio-Isis;a=blobdiff_plain;f=t%2F2_isis.t;h=1ebebe1fda0c6c19d5ca0c3fb89f59b5c9c0581a;hp=83508d1b61a062a9be3f62e69387f7267ee6976c;hb=02bc52c86c5997410f90477bba81271e64502a32;hpb=514d07d2bc4ea623d32860cce42a09691856534b diff --git a/t/2_isis.t b/t/2_isis.t index 83508d1..1ebebe1 100755 --- a/t/2_isis.t +++ b/t/2_isis.t @@ -3,7 +3,7 @@ use strict; use blib; -use Test::More tests => 134; +use Test::More tests => 174; use File::Spec; BEGIN { @@ -192,6 +192,12 @@ diag "record = ",Dumper($isis->{record}) if ($debug); $isis = Biblio::Isis->new ( isisdb => $path_winisis, debug => $debug, + hash_filter => sub { + my ($l,$nr) = @_; + ok(grep(/$nr/, keys %{ $isis->{record} }), "hash_filter $nr in record"); + ok(grep(/\Q$l\E/, @{ $isis->{record}->{$nr} }), "hash_filter line $l found"); + return($l); + }, ); ok(! $isis->fetch(3), "deleted not found"); @@ -271,3 +277,4 @@ is_deeply( $hash, { ], 902 => [{ a => "a1 ; a2 ; a3 ; a4 ; a5", b => "b1 ; b2", c => "c1" }], }, 'hash is_deeply'); +