File Coverage

File:t/Heading_MARC21.t
Coverage:80.8%

linestmtbrancondsubtimecode
1#!/usr/bin/perl
2#
3# This Koha test module is a stub!
4# Add more tests here!!!
5
6
1
1
1
1.33283524365859e+15
2
24
use strict;
7
1
1
1
4
1
862
use warnings;
8
9
1
1
1
270
25982
31
use Test::More tests => 3;
10
1
1
1
2390
14
24
use C4::Context;
11
12BEGIN {
13
1
16
        use_ok('C4::Heading');
14}
15
16
1
10
SKIP: {
17
1
356680
    skip "MARC21 heading tests not applicable to UNIMARC", 2 if C4::Context->preference('marcflavour') eq 'UNIMARC';
18
0
0
    my $field = MARC::Field->new( '650', ' ', '0', a => 'Uncles', x => 'Fiction' );
19
0
0
    my $heading = C4::Heading->new_from_bib_field($field);
20
0
0
    is($heading->display_form(), 'Uncles--Fiction', 'Display form generation');
21
0
0
    is($heading->search_form(), 'Uncles generalsubdiv Fiction', 'Search form generation');
22}