bug 6201: (follow-up) update unit tests
authorGalen Charlton <gmc@esilibrary.com>
Wed, 9 Oct 2013 05:26:27 +0000 (05:26 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 9 Oct 2013 05:26:27 +0000 (05:26 +0000)
This patch updates the unit tests for the BibTeX export
to add a regression test for supplying the author for
non-UNIMARC records.  It also adjusts the test to reflect
the change in quote character from "" to {}.

To test:

[1] Verify that prove -v t/db_dependent/Record.t passes

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
t/db_dependent/Record.t

index 2e04449..02bf8b1 100755 (executable)
@@ -84,15 +84,19 @@ my $test4xml=qq(<?xml version="1.0" encoding="UTF-8"?>
 
 is ($mods, $test4xml, "testing marc2mosxml");
 
+$marc->append_fields(MARC::Field->new(
+    '100', ' ', ' ', a => 'Rowling, J.K.'
+));
 my $field = MARC::Field->new('245','','','a' => "Harry potter");
 $marc->append_fields($field);
 
 #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}
 }
 );