Skip to content

Commit f4b4808

Browse files
committed
Add test for brace syntax in bib
1 parent 004530b commit f4b4808

6 files changed

Lines changed: 42 additions & 1 deletion

File tree

tests/bibtex.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ fn test_single_entry() {
8989
TestCase::new("single_entry", Some("cites")).go()
9090
}
9191

92+
#[test]
93+
fn test_brace_string() {
94+
TestCase::new("brace_string", Some("cites")).go();
95+
}
96+
9297
#[test]
9398
fn test_many() {
9499
TestCase::new("many", Some("cites")).go();
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\relax
2+
\citation{Nobody06}
3+
\citation{Book01}
4+
\bibdata{brace_string}
5+
\bibcite{Nobody06}{1}
6+
\bibcite{Book01}{1}
7+
\bibstyle{../plain}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
\begin{thebibliography}{1}
2+
3+
\bibitem{Nobody06}
4+
Nobody Jr.
5+
\newblock {My} article, 2006.
6+
7+
\bibitem{Book01}
8+
Nobody Sr.
9+
\newblock {\em Foo {Bar}}.
10+
\newblock 2020.
11+
12+
\end{thebibliography}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
@misc{ Nobody06,
2+
author = {Nobody Jr},
3+
title = "{My} Article",
4+
year = {2006}
5+
}
6+
7+
@book { Book01,
8+
author = {Nobody Sr},
9+
title = {Foo {Bar}},
10+
year = {2020},
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This is BibTeX, Version 0.99d
2+
Capacity: max_strings=35307, hash_size=35307, hash_prime=30011
3+
The top-level auxiliary file: brace_string.aux
4+
The style file: ../plain.bst
5+
Database file #1: brace_string.bib
6+
Warning--empty publisher in Book01
7+
(There was 1 warning)

tests/bibtex/cites/many.bib

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ @book{ Nobody02
1919
@misc { Nobody03 }
2020

2121
@misc { Nobody04 }
22-

0 commit comments

Comments
 (0)