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