Lines 7-18
use strict;
Link Here
|
7 |
use warnings; |
7 |
use warnings; |
8 |
|
8 |
|
9 |
use Test::More tests => 3; |
9 |
use Test::More tests => 3; |
|
|
10 |
use C4::Context; |
10 |
|
11 |
|
11 |
BEGIN { |
12 |
BEGIN { |
12 |
use_ok('C4::Heading'); |
13 |
use_ok('C4::Heading'); |
13 |
} |
14 |
} |
14 |
|
15 |
|
15 |
my $field = MARC::Field->new( '650', ' ', '0', a => 'Uncles', x => 'Fiction' ); |
16 |
SKIP: { |
16 |
my $heading = C4::Heading->new_from_bib_field($field); |
17 |
skip "MARC21 heading tests not applicable to UNIMARC", 2 if C4::Context->preference('marcflavour') eq 'UNIMARC'; |
17 |
is($heading->display_form(), 'Uncles--Fiction', 'Display form generation'); |
18 |
my $field = MARC::Field->new( '650', ' ', '0', a => 'Uncles', x => 'Fiction' ); |
18 |
is($heading->search_form(), 'Uncles generalsubdiv Fiction', 'Search form generation'); |
19 |
my $heading = C4::Heading->new_from_bib_field($field); |
|
|
20 |
is($heading->display_form(), 'Uncles--Fiction', 'Display form generation'); |
21 |
is($heading->search_form(), 'Uncles generalsubdiv Fiction', 'Search form generation'); |
22 |
} |
19 |
- |
|
|