# This Koha test module is a stub!
# Add more tests here!!!
-use strict;
-use warnings;
+use Modern::Perl;
-use Test::More tests => 10;
+use Test::More tests => 11;
use MARC::Record;
BEGIN {
));
my $field = MARC::Field->new('245','','','a' => "Harry potter");
$marc->append_fields($field);
+$marc->append_fields(MARC::Field->new(
+ '260', ' ', ' ', b => 'Scholastic', c => '2001'
+));
#my $endnote=marc2endnote($marc->as_usmarc);
#print $endnote;
my $bibtex=marc2bibtex($marc, 'testID');
my $test5xml=qq(\@book{testID,
author = {Rowling, J.K.},
- title = {Harry potter}
+ title = {Harry potter},
+ publisher = {Scholastic},
+ year = {2001}
}
);
is ($bibtex, $test5xml, "testing bibtex");
+$marc->append_fields(MARC::Field->new(
+ '264', '3', '1', b => 'Reprints', c => '2011'
+));
+$bibtex = marc2bibtex($marc, 'testID');
+my $rdabibtex = qq(\@book{testID,
+ author = {Rowling, J.K.},
+ title = {Harry potter},
+ publisher = {Reprints},
+ year = {2011}
+}
+);
+is ($bibtex, $rdabibtex, "testing bibtex with RDA 264 field");
+
my @entity=C4::Record::_entity_encode("Björn");
is ($entity[0], "Björn", "Html umlauts");