From db86f45bd7c2a650c1a9546eeb762b0218dce3da Mon Sep 17 00:00:00 2001 From: Olli Suutari Date: Mon, 5 Jun 2017 05:58:38 +0300 Subject: [PATCH] Expanded the test_reference_matched_full to include results with dots after numbers, eg. 1. Kings --- tests/functional/openlp_plugins/bibles/test_lib.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/functional/openlp_plugins/bibles/test_lib.py b/tests/functional/openlp_plugins/bibles/test_lib.py index 2c2615a7a..5ae8ae85d 100644 --- a/tests/functional/openlp_plugins/bibles/test_lib.py +++ b/tests/functional/openlp_plugins/bibles/test_lib.py @@ -68,7 +68,8 @@ class TestLib(TestCase, TestMixin): """ # GIVEN: Some test data which contains different references to parse, with the expected results. with patch('openlp.plugins.bibles.lib.Settings', return_value=MagicMock(**{'value.return_value': ''})): - # The following test data tests with 222 variants when using the default 'separators' + # The following test data tests with about 240 variants when using the default 'separators' + # The amount is exactly 222 without '1. John 23' and'1. John. 23' test_data = [ # Input reference, book name, chapter + verse reference ('Psalm 23', 'Psalm', '23'), @@ -84,6 +85,8 @@ class TestLib(TestCase, TestMixin): ('Psalm 23{_and}24', 'Psalm', '23,24'), ('1 John 23', '1 John', '23'), ('1 John. 23', '1 John', '23'), + ('1. John 23', '1. John', '23'), + ('1. John. 23', '1. John', '23'), ('1 John 23{to}24', '1 John', '23-24'), ('1 John 23{verse}1{to}2', '1 John', '23:1-2'), ('1 John 23{verse}1{to}{end}', '1 John', '23:1-end'),