summaryrefslogtreecommitdiff
path: root/biblio/bibtex/utils/bibtexperllibs/BibTeX-Parser/t/bug67419.t
diff options
context:
space:
mode:
Diffstat (limited to 'biblio/bibtex/utils/bibtexperllibs/BibTeX-Parser/t/bug67419.t')
-rw-r--r--biblio/bibtex/utils/bibtexperllibs/BibTeX-Parser/t/bug67419.t29
1 files changed, 29 insertions, 0 deletions
diff --git a/biblio/bibtex/utils/bibtexperllibs/BibTeX-Parser/t/bug67419.t b/biblio/bibtex/utils/bibtexperllibs/BibTeX-Parser/t/bug67419.t
new file mode 100644
index 0000000000..0f944f373a
--- /dev/null
+++ b/biblio/bibtex/utils/bibtexperllibs/BibTeX-Parser/t/bug67419.t
@@ -0,0 +1,29 @@
+#!/usr/bin/perl -w
+
+use Test::More;
+
+use BibTeX::Parser;
+use IO::File;
+
+my $fh = new IO::File "t/bibs/braces.bib", "r" ;
+my $parser = new BibTeX::Parser $fh;
+while (my $entry=$parser->next) {
+ is($entry->parse_ok,1);
+ if ($entry->key eq 'scholkopf98kpca') {
+ @authors=$entry->author;
+ is(scalar @authors,3);
+ is("$authors[0]", '{Sch\"olkopf}, Bernhard');
+ is("$authors[1]", 'Smola, Alex');
+ is("$authors[2]", 'Muller, K.R.');
+ }
+ if ($entry->key eq 'brownetal93') {
+ @authors=$entry->author;
+ is(scalar @authors,4);
+ is("$authors[0]", 'Brown, Peter F.');
+ is("$authors[1]", '{Della Pietra}, Stephen A.');
+ is("$authors[2]", '{Della Pietra}, Vincent J.');
+ is("$authors[3]", 'Mercer, Robert~L.');
+ }
+}
+
+done_testing();