From 3260de7b7c351b9d3a134211a78b9264bbc1095e Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Mon, 31 Mar 2014 17:31:05 +0200 Subject: [PATCH] added another test --- tests/functional/openlp_core_lib/test_renderer.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/functional/openlp_core_lib/test_renderer.py b/tests/functional/openlp_core_lib/test_renderer.py index cd07ad9a2..22b7c4a7b 100644 --- a/tests/functional/openlp_core_lib/test_renderer.py +++ b/tests/functional/openlp_core_lib/test_renderer.py @@ -104,3 +104,18 @@ class TestRenderer(TestCase): # THEN: Check if the correct tuple is returned. self.assertEqual(result, expected_tuple), 'A tuple should be returned ' '(fixed-text, opening tags, html opening tags).' + + def _word_split_test(self): + """ + Test the _word_split() method + """ + # GIVEN: A line of text + renderer = Renderer() + given_line = 'beginning asdf \n end asdf' + expected_words = ['beginning', 'asdf', 'end', 'asdf'] + + # WHEN: Split the line + result_words = renderer._words_split(given_line) + + # THEN: The word lists should be the same. + self.assertListEqual(result_words, expected_words)