X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=t%2Fdb_dependent%2FRecord.t;h=e8d60948f9feb5f757af797e2b4ac3c26475ff67;hb=3bcc0321812b153e3a487c65a1bd0edd75172f03;hp=2e0444911cb34a32ca63cd09c4eb50274ff4d957;hpb=b06a289173d0f2e299b0c8652d59d47dc196062c;p=koha_fer diff --git a/t/db_dependent/Record.t b/t/db_dependent/Record.t index 2e0444911c..e8d60948f9 100755 --- a/t/db_dependent/Record.t +++ b/t/db_dependent/Record.t @@ -3,10 +3,9 @@ # 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 { @@ -82,22 +81,44 @@ my $test4xml=qq( ); -is ($mods, $test4xml, "testing marc2mosxml"); +is ($mods, $test4xml, "testing marc2modsxml"); +$marc->append_fields(MARC::Field->new( + '100', ' ', ' ', a => 'Rowling, J.K.' +)); 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); -my $test5xml=qq(\@book{, - title = "Harry potter" +my $bibtex=marc2bibtex($marc, 'testID'); +my $test5xml=qq(\@book{testID, + author = {Rowling, J.K.}, + 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");