Bug 8643: Fix IsMarcStructureInternal tests
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
fb69268862
commit
a6b359ccbb
|
|
@ -824,7 +824,7 @@ sub GetISBDView {
|
|||
# Process subfield
|
||||
}
|
||||
|
||||
GetMarcStructure creates keys (lib, tab, mandatory, repeatable) for a display purpose.
|
||||
GetMarcStructure creates keys (lib, tab, mandatory, repeatable, important) for a display purpose.
|
||||
These different values should not be processed as valid subfields.
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -554,7 +554,7 @@ subtest 'NORMARC' => sub {
|
|||
};
|
||||
|
||||
subtest 'IsMarcStructureInternal' => sub {
|
||||
plan tests => 8;
|
||||
plan tests => 9;
|
||||
my $tagslib = GetMarcStructure();
|
||||
my @internals;
|
||||
for my $tag ( sort keys %$tagslib ) {
|
||||
|
|
@ -564,11 +564,12 @@ subtest 'IsMarcStructureInternal' => sub {
|
|||
}
|
||||
}
|
||||
@internals = uniq @internals;
|
||||
is( scalar(@internals), 6, 'expect 6 internals');
|
||||
is( scalar(@internals), 7, 'expect 7 internals');
|
||||
is( grep( /^lib$/, @internals ), 1, 'check lib' );
|
||||
is( grep( /^tab$/, @internals ), 1, 'check tab' );
|
||||
is( grep( /^mandatory$/, @internals ), 1, 'check mandatory' );
|
||||
is( grep( /^repeatable$/, @internals ), 1, 'check repeatable' );
|
||||
is( grep( /^important$/, @internals ), 1, 'check important' );
|
||||
is( grep( /^a$/, @internals ), 0, 'no subfield a' );
|
||||
is( grep( /^ind1_defaultvalue$/, @internals ), 1, 'check indicator 1 default value' );
|
||||
is( grep( /^ind2_defaultvalue$/, @internals ), 1, 'check indicator 2 default value' );
|
||||
|
|
|
|||
Loading…
Reference in New Issue