diff options
author | Martin Vilcans <martin@librador.com> | 2012-03-12 22:04:48 +0100 |
---|---|---|
committer | Martin Vilcans <martin@librador.com> | 2012-03-12 22:04:48 +0100 |
commit | d1b3033b546a1e96f77f87d06fffe1ff36b0b989 (patch) | |
tree | 77303f77945bed263f664b596a1af17af4ea4ab9 /tests/fountain_test.py | |
parent | dada415e8077f0d6f43ed7d6a31191af69551d0f (diff) | |
download | screenplain-d1b3033b546a1e96f77f87d06fffe1ff36b0b989.tar.gz |
Support sections that are bunched together.
Diffstat (limited to 'tests/fountain_test.py')
-rw-r--r-- | tests/fountain_test.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/fountain_test.py b/tests/fountain_test.py index 5b1d386..69426db 100644 --- a/tests/fountain_test.py +++ b/tests/fountain_test.py @@ -96,6 +96,23 @@ class SectionTests(unittest2.TestCase): self.assertEquals(2, paras[1].level) self.assertEquals(plain('second level'), paras[1].text) + def test_multiple_sections_in_one_paragraph(self): + paras = parse([ + '# first level', + '## second level', + '# first level again' + ]) + self.assertEquals( + [Section, Section, Section], + [type(p) for p in paras] + ) + self.assertEquals(1, paras[0].level) + self.assertEquals(plain('first level'), paras[0].text) + self.assertEquals(2, paras[1].level) + self.assertEquals(plain('second level'), paras[1].text) + self.assertEquals(1, paras[2].level) + self.assertEquals(plain('first level again'), paras[2].text) + class DialogTests(unittest2.TestCase): # A Character element is any line entirely in caps, with one empty |