Skip to content

Commit e625488

Browse files
authored
Merge pull request #1075 from CraftSpider/bibtex-tests
Add another bibtex test
2 parents 004530b + 585f115 commit e625488

6 files changed

Lines changed: 49 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("odd_strings", Some("cites")).go();
95+
}
96+
9297
#[test]
9398
fn test_many() {
9499
TestCase::new("many", Some("cites")).go();

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-

tests/bibtex/cites/odd_strings.aux

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
\relax
2+
\citation{Nobody06}
3+
\citation{Book01}
4+
\citations{Article01}
5+
\bibdata{odd_strings}
6+
\bibcite{Nobody06}{1}
7+
\bibcite{Book01}{1}
8+
\bibcite{Article01}{1}
9+
\bibstyle{../plain}

tests/bibtex/cites/odd_strings.bbl

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 {\em Bar}}.
10+
\newblock Book Publisher, July 2020.
11+
12+
\end{thebibliography}

tests/bibtex/cites/odd_strings.bib

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 {\em Bar}},
10+
year = 2020,
11+
month = jul,
12+
publisher = {Book Publisher},
13+
}
14+
15+
@article{ Article01,
16+
title = {Article 1},
17+
keywords = {Galaxy {$\omega$}},
18+
}

tests/bibtex/cites/odd_strings.blg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This is BibTeX, Version 0.99d
2+
Capacity: max_strings=35307, hash_size=35307, hash_prime=30011
3+
The top-level auxiliary file: odd_strings.aux
4+
The style file: ../plain.bst
5+
Database file #1: odd_strings.bib

0 commit comments

Comments
 (0)