Skip to content

Commit

Permalink
Add parser test (#11726)
Browse files Browse the repository at this point in the history
  • Loading branch information
calixtus authored Sep 7, 2024
1 parent d446b82 commit 9fc4ae5
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,18 @@ void parseRecognizesFieldsWithEscapedQuotationMarks() throws IOException {
assertEquals(List.of(expected), result.getDatabase().getEntries());
}

@Test
void parseRecognizesFieldsWithQuotationMarksInBrackets() throws IOException {
ParserResult result = parser
.parse(new StringReader("@article{test,title=\"Comments on {\"}Filenames and Fonts{\"}\"}"));

BibEntry expected = new BibEntry(StandardEntryType.Article)
.withCitationKey("test")
.withField(StandardField.TITLE, "Comments on {\"}Filenames and Fonts{\"}");

assertEquals(List.of(expected), result.getDatabase().getEntries());
}

@Test
void parseIgnoresAndWarnsAboutEntryWithFieldsThatAreNotSeperatedByComma() throws IOException {
ParserResult result = parser
Expand Down

0 comments on commit 9fc4ae5

Please sign in to comment.