3
5
#Tests for field 880 and for subfield 6
10
19
BEGIN { use_ok( 'MARC::File::USMARC' ); }
11
21
BEGIN { use_ok( 'MARC::Lint' ); }
14
27
my $marc = MARC::Record->new();
15
29
isa_ok( $marc, 'MARC::Record', 'MARC record' );
17
33
$marc->leader("00000nam 22002538a 4500");
19
37
my $nfields = $marc->add_fields(
22
43
['008', '070520s2007 ilu 000 0 eng d',
44
87
a => "Mount Morris, Ill. :",
54
107
a => "<Title in CJK script>.",
57
113
is( $nfields, 11, "All the fields added OK" );
64
127
my $lint = new MARC::Lint;
65
129
isa_ok( $lint, 'MARC::Lint' );
67
133
$lint->check_record( $marc );
68
135
my @warnings = $lint->warnings;
70
139
my $expected = shift @expected;
71
141
my $actual = shift @warnings;
73
145
is( $actual, $expected, "Checking expected messages" );
75
149
is( scalar @expected, 0, "All expected messages exhausted." );