From c25b0aa8ffc8a6ceaa25fab898b898f7587718d9 Mon Sep 17 00:00:00 2001 From: Martin Thompson Date: Mon, 6 Sep 2010 21:37:22 +0100 Subject: [PATCH] Test for multi character versetypes --- openlp/plugins/songs/lib/test/test.opensong | 13 ++++++++++++- .../plugins/songs/lib/test/test_opensongimport.py | 6 ++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/lib/test/test.opensong b/openlp/plugins/songs/lib/test/test.opensong index 0390f99b2..c75951492 100644 --- a/openlp/plugins/songs/lib/test/test.opensong +++ b/openlp/plugins/songs/lib/test/test.opensong @@ -4,7 +4,7 @@ MartiÑ & Martin2 Thómpson 2010 Martin Thompson 1 - V1 C V2 C2 3a B1 V1 T U + V1 C V2 C2 3a B1 V1 T U Rap1 Rap2 Rap3 Blah @@ -47,6 +47,17 @@ [T] T Line 1 +[Rap] +1 Rap 1 Line 1 +2 Rap 2 Line 1 +1 Rap 1 Line 2 +2 Rap 2 Line 2 + +[rap3] + Rap 3 Line 1 + Rap 3 Line 2 + + [X] Unreferenced verse line 1 diff --git a/openlp/plugins/songs/lib/test/test_opensongimport.py b/openlp/plugins/songs/lib/test/test_opensongimport.py index eabcce7e5..b503c65c5 100644 --- a/openlp/plugins/songs/lib/test/test_opensongimport.py +++ b/openlp/plugins/songs/lib/test/test_opensongimport.py @@ -63,8 +63,11 @@ def test(): assert [u'V1', u'v1 Line 1\nV1 Line 2'] in o.verses assert [u'V2', u'v2 Line 1\nV2 Line 2'] in o.verses assert [u'V3A', u'V3 Line 1\nV3 Line 2'] in o.verses + assert [u'RAP1', u'Rap 1 Line 1\nRap 1 Line 2'] in o.verses + assert [u'RAP2', u'Rap 2 Line 1\nRap 2 Line 2'] in o.verses + assert [u'RAP3', u'Rap 3 Line 1\nRap 3 Line 2'] in o.verses assert [u'X1', u'Unreferenced verse line 1'] in o.verses - assert o.verse_order_list == [u'V1', u'C1', u'V2', u'C2', u'V3A', u'B1', u'V1', u'T1'] + assert o.verse_order_list == [u'V1', u'C1', u'V2', u'C2', u'V3A', u'B1', u'V1', u'T1', u'RAP1', u'RAP2', u'RAP3'] assert o.ccli_number == u'Blah' assert o.topics == [u'TestTheme', u'TestAltTheme'] @@ -120,7 +123,6 @@ def test(): assert [u'V1', u'Line 1\nLine 2'] in o.verses print "Tests passed" - pass if __name__ == "__main__": test()