/[Biblio-Isis]/trunk/t/2_isis.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/t/2_isis.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 68 by dpavlin, Fri Aug 25 10:20:58 2006 UTC revision 69 by dpavlin, Sun Oct 29 15:37:43 2006 UTC
# Line 3  Line 3 
3  use strict;  use strict;
4  use blib;  use blib;
5    
6  use Test::More tests => 176;  use Test::More tests => 181;
7  use File::Spec;  use File::Spec;
8    
9  BEGIN {  BEGIN {
# Line 271  ok($hash = $isis->to_hash({ mfn => $isis Line 271  ok($hash = $isis->to_hash({ mfn => $isis
271  diag "to_hash = ",Dumper( $hash ) if ($debug);  diag "to_hash = ",Dumper( $hash ) if ($debug);
272  is_deeply( $hash, {  is_deeply( $hash, {
273     "000" => [42],     "000" => [42],
274       900   => [{ a => "900a", b => "900b", c => "900c" }],
275       901   => [
276                  { a => "901a-1", b => "901b-1", c => "901c-1" },
277                  { a => "901a-2", b => "901b-2" },
278                  { a => "901a-3" },
279                ],
280       902   => [{ a => "a1 ; a2 ; a3 ; a4 ; a5", b => "b1 ; b2", c => "c1" }],
281    }, 'hash is_deeply');
282    
283    my $isis2;
284    ok($isis2 = Biblio::Isis->new (
285            isisdb => $path_winisis,
286            join_subfields_with => ' ; ',
287    ),"new( join_subfields_with )");
288    ok($isis2->{record} = $isis->{record}, "copy record");
289    ok($isis2->{current_mfn} = $isis->{current_mfn}, "copy current_mfn");
290    
291    ok($hash = $isis2->to_hash( $isis->mfn ), 'to_hash(mfn)');
292    diag "to_hash = ",Dumper( $hash ) if ($debug);
293    is_deeply( $hash, {
294       "000" => [42],
295     900   => [{ a => "900a", b => "900b", c => "900c" }],     900   => [{ a => "900a", b => "900b", c => "900c" }],
296     901   => [     901   => [
297                { a => "901a-1", b => "901b-1", c => "901c-1" },                { a => "901a-1", b => "901b-1", c => "901c-1" },

Legend:
Removed from v.68  
changed lines
  Added in v.69

  ViewVC Help
Powered by ViewVC 1.1.26