aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2011-11-15 23:12:31 +0100
committerMartin Vilcans <martin@librador.com>2011-11-25 20:19:56 +0100
commit2bfa3b3e77b0cbd8ad2db3dee52e66f7fde12a30 (patch)
tree301fcb91f82a127c0cf608b457c46c5bd1f4ce5a /tests
parent179bd424ee8b5a01584cd4cd7d76df8ba8a1f3d4 (diff)
downloadscreenplain-2bfa3b3e77b0cbd8ad2db3dee52e66f7fde12a30.tar.gz
Allow whitespace after "<" on centered line.
Diffstat (limited to 'tests')
-rw-r--r--tests/spmd_test.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index d5a4615..ee4cd19 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -214,13 +214,19 @@ class ParseTests(unittest2.TestCase):
self.assertTrue(paras[0].centered)
def test_full_centered_paragraph(self):
- paras = list(parse([
+ lines = [
'> first! <',
- ' > second! <',
- '> third! <',
- ]))
+ ' > second! <',
+ '> third!< ',
+ ]
+ paras = list(parse(lines))
self.assertEquals([Action], [type(p) for p in paras])
self.assertTrue(paras[0].centered)
+ self.assertEquals([
+ plain('first!'),
+ plain('second!'),
+ plain('third!'),
+ ], paras[0].lines)
def test_upper_case_centered_not_parsed_as_dialog(self):
paras = list(parse([
@@ -232,13 +238,15 @@ class ParseTests(unittest2.TestCase):
self.assertTrue(paras[0].centered)
def test_centering_marks_in_middle_of_paragraphs_are_verbatim(self):
- paras = list(parse([
+ lines = [
'first!',
'> second! <',
'third!',
- ]))
+ ]
+ paras = list(parse(lines))
self.assertEquals([Action], [type(p) for p in paras])
self.assertFalse(paras[0].centered)
+ self.assertEquals([plain(line) for line in lines], paras[0].lines)
if __name__ == '__main__':
unittest2.main()