aboutsummaryrefslogtreecommitdiffstats
path: root/tests/spmd_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spmd_test.py')
-rw-r--r--tests/spmd_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index fbc7867..f1c62bf 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -208,5 +208,28 @@ class ParseTests(unittest2.TestCase):
(False, plain("And I'll no longer be a Capulet.")),
], paras[0].blocks)
+ def test_single_centered_line(self):
+ paras = list(parse(['> center me! <']))
+ self.assertEquals([Action], [type(p) for p in paras])
+ self.assertTrue(paras[0].centered)
+
+ def test_full_centered_paragraph(self):
+ paras = list(parse([
+ '> first! <',
+ ' > second! <',
+ '> third! <',
+ ]))
+ self.assertEquals([Action], [type(p) for p in paras])
+ self.assertTrue(paras[0].centered)
+
+ def test_centering_marks_in_middle_of_paragraphs_are_verbatim(self):
+ paras = list(parse([
+ 'first!',
+ '> second! <',
+ 'third!',
+ ]))
+ self.assertEquals([Action], [type(p) for p in paras])
+ self.assertFalse(paras[0].centered)
+
if __name__ == '__main__':
unittest2.main()