From c204a586bf23e5879c8e85383888f00e81b5b190 Mon Sep 17 00:00:00 2001 From: Nathan Patton Date: Wed, 18 Oct 2023 16:54:54 -0500 Subject: [PATCH] New unit test to reproduce issue --- tests/parser_test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/parser_test.py b/tests/parser_test.py index 120d3ff..ddb993d 100644 --- a/tests/parser_test.py +++ b/tests/parser_test.py @@ -312,3 +312,18 @@ def test_book_abbreviations() -> None: if book != book.SONG_OF_SONGS: assert expected == actual_period + + +def test_multiple_references_with_prefixes() -> None: + # Given an input string containing multiple references with prefixes, + # separated by commas + input_string = "1 Corinthians 1:1, 2 Corinthians 1:1" + + # When we parse the references from that string + references = bible.get_references(input_string) + + # Then we get the expected references + assert references == [ + bible.NormalizedReference(bible.Book.CORINTHIANS_1, 1, 1, 1, 1), + bible.NormalizedReference(bible.Book.CORINTHIANS_2, 1, 1, 1, 1), + ]