forked from openlp/openlp
Strip whitespace from title when importing a Songbeamer song.
bzr-revno: 2596
This commit is contained in:
commit
04e117181d
@ -242,7 +242,7 @@ class SongBeamerImport(SongImport):
|
|||||||
elif tag_val[0] == '#TextAlign':
|
elif tag_val[0] == '#TextAlign':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#Title':
|
elif tag_val[0] == '#Title':
|
||||||
self.title = str(tag_val[1])
|
self.title = str(tag_val[1]).strip()
|
||||||
elif tag_val[0] == '#TitleAlign':
|
elif tag_val[0] == '#TitleAlign':
|
||||||
pass
|
pass
|
||||||
elif tag_val[0] == '#TitleFontSize':
|
elif tag_val[0] == '#TitleFontSize':
|
||||||
|
@ -4,11 +4,11 @@ Package to test the openlp.core.lib.htmlbuilder module.
|
|||||||
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore, QtWebKit
|
||||||
|
|
||||||
from openlp.core.common import Settings
|
from openlp.core.common import Settings
|
||||||
from openlp.core.lib.htmlbuilder import build_html, build_background_css, build_lyrics_css, build_lyrics_outline_css, \
|
from openlp.core.lib.htmlbuilder import build_html, build_background_css, build_lyrics_css, build_lyrics_outline_css, \
|
||||||
build_lyrics_format_css, build_footer_css
|
build_lyrics_format_css, build_footer_css, webkit_version
|
||||||
from openlp.core.lib.theme import HorizontalType, VerticalType
|
from openlp.core.lib.theme import HorizontalType, VerticalType
|
||||||
from tests.functional import MagicMock, patch
|
from tests.functional import MagicMock, patch
|
||||||
from tests.helpers.testmixin import TestMixin
|
from tests.helpers.testmixin import TestMixin
|
||||||
@ -358,3 +358,14 @@ class Htmbuilder(TestCase, TestMixin):
|
|||||||
|
|
||||||
# THEN: Footer should wrap
|
# THEN: Footer should wrap
|
||||||
self.assertEqual(FOOTER_CSS_WRAP, css, 'The footer strings should be equal.')
|
self.assertEqual(FOOTER_CSS_WRAP, css, 'The footer strings should be equal.')
|
||||||
|
|
||||||
|
def webkit_version_test(self):
|
||||||
|
"""
|
||||||
|
Test the webkit_version() function
|
||||||
|
"""
|
||||||
|
# GIVEN: Webkit
|
||||||
|
webkit_ver = float(QtWebKit.qWebKitVersion())
|
||||||
|
# WHEN: Retrieving the webkit version
|
||||||
|
# THEN: Webkit versions should match
|
||||||
|
self.assertEquals(webkit_version(), webkit_ver, "The returned webkit version doesn't match the installed one")
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LangCount=1
|
#LangCount=1
|
||||||
#Title=GL 1 - Lobsinget dem Herrn
|
#Title= GL 1 - Lobsinget dem Herrn
|
||||||
#Author=Carl Brockhaus
|
#Author=Carl Brockhaus
|
||||||
#Melody=Johann Jakob Vetter
|
#Melody=Johann Jakob Vetter
|
||||||
#Editor=SongBeamer 4.20
|
#Editor=SongBeamer 4.20
|
||||||
|
Loading…
Reference in New Issue
Block a user