diff options
| author | Martin Vilcans <martin@librador.com> | 2011-11-15 21:17:40 +0100 |
|---|---|---|
| committer | Martin Vilcans <martin@librador.com> | 2011-11-15 21:17:40 +0100 |
| commit | ddda345a77ee4232002e5179b3ba7992a112af76 (patch) | |
| tree | d80fa7698e23a1b7c46a21bd03b4a825cc688dd6 /tests | |
| parent | 083800d933041f7a35cb19011d68d1e51c7f8b9f (diff) | |
Added support for >centering text<
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/spmd_test.py | 23 |
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() |
