Lines 94-100
subtest 'Multiple mappings for one kohafield' => sub {
Link Here
|
94 |
}; |
94 |
}; |
95 |
|
95 |
|
96 |
subtest 'Testing _adjust_pubyear' => sub { |
96 |
subtest 'Testing _adjust_pubyear' => sub { |
97 |
plan tests => 8; |
97 |
plan tests => 10; |
98 |
|
98 |
|
99 |
is( C4::Biblio::_adjust_pubyear('2004 c2000 2007'), 2000, 'First cYEAR' ); |
99 |
is( C4::Biblio::_adjust_pubyear('2004 c2000 2007'), 2000, 'First cYEAR' ); |
100 |
is( C4::Biblio::_adjust_pubyear('2004 2000 2007'), 2004, 'First year' ); |
100 |
is( C4::Biblio::_adjust_pubyear('2004 2000 2007'), 2004, 'First year' ); |
Lines 104-109
subtest 'Testing _adjust_pubyear' => sub {
Link Here
|
104 |
is( C4::Biblio::_adjust_pubyear('1...'), 1000, '1... on its own' ); |
104 |
is( C4::Biblio::_adjust_pubyear('1...'), 1000, '1... on its own' ); |
105 |
is( C4::Biblio::_adjust_pubyear('12?? 13xx'), 1200, '12?? first' ); |
105 |
is( C4::Biblio::_adjust_pubyear('12?? 13xx'), 1200, '12?? first' ); |
106 |
is( C4::Biblio::_adjust_pubyear('12? 1x'), '12? 1x', 'Too short' ); |
106 |
is( C4::Biblio::_adjust_pubyear('12? 1x'), '12? 1x', 'Too short' ); |
|
|
107 |
is( C4::Biblio::_adjust_pubyear('198-'), '198-', 'Missing question mark' ); |
108 |
is( C4::Biblio::_adjust_pubyear('198-?'), '1980', '198-?' ); |
107 |
}; |
109 |
}; |
108 |
|
110 |
|
109 |
# Cleanup |
111 |
# Cleanup |
110 |
- |
|
|