/[webpac2]/trunk/t/3-normalize.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/3-normalize.t

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

revision 546 by dpavlin, Thu Jun 29 15:29:41 2006 UTC revision 547 by dpavlin, Thu Jun 29 23:19:26 2006 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4    
5  use Test::More tests => 69;  use Test::More tests => 75;
6  use Test::Exception;  use Test::Exception;
7  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
8  use blib;  use blib;
# Line 342  sub test_s { Line 342  sub test_s {
342          }, 'correct get_ds');          }, 'correct get_ds');
343    
344          # MARC          # MARC
345          test_s(qq{ marc21('900','a', rec('200') ) });          test_s(qq{ marc_indicators('900',1,2) });
346            test_s(qq{ marc('900','a', rec('200') ) });
347          my @marc;          my @marc;
348          ok(@marc = WebPAC::Normalize::_get_marc21_fields(), "_get_marc21_fields");          ok(@marc = WebPAC::Normalize::_get_marc_fields(), "_get_marc_fields");
349          diag Dumper(\@marc);  
350            is_deeply( \@marc, [
351                    [ '900', 1, 2, 'a', '200a' ],
352                    [ '900', 1, 2, 'a', '200-solo' ]
353            ], 'correct marc with indicators');
354    
355            test_s(qq{ marc_indicators('900',' ',9) });
356            test_s(qq{ marc_repeatable_subfield('900','a', rec('200') ) });
357    
358            ok(@marc = WebPAC::Normalize::_get_marc_fields(), "_get_marc_fields");
359    
360            is_deeply( \@marc, [
361                    [ '900', 1, 2, 'a', '200a', 'a', '200-solo' ],
362                    [ '900', ' ', 9, 'a', '200a', 'a', '200-solo' ]
363            ], 'correct marc with repetable subfield');
364  }  }
365    

Legend:
Removed from v.546  
changed lines
  Added in v.547

  ViewVC Help
Powered by ViewVC 1.1.26