aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2011-12-16 23:41:56 +0100
committerMartin Vilcans <martin@librador.com>2011-12-16 23:45:01 +0100
commit8485c49836ea746016101e6fc3f941564ced75c3 (patch)
treebb42f702c87968c6a7c3de7f0f4cfd2b4a3ae66a /tests
parent1f76285463d19f21e7e09ddb8c6fc876ea2c8740 (diff)
downloadscreenplain-8485c49836ea746016101e6fc3f941564ced75c3.tar.gz
A leading ">" on a line means it's parsed as a transition.
(But only if it's the last paragraph or followed by a slug.)
Diffstat (limited to 'tests')
-rw-r--r--tests/spmd_test.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index 2efa2d4..52b2348 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -190,6 +190,27 @@ class ParseTests(unittest2.TestCase):
]))
self.assertEquals([Action, Action, Action], [type(p) for p in paras])
+ def test_greater_than_sign_means_transition(self):
+ paras = list(parse([
+ 'Bill blows out the match.',
+ '',
+ '> FADE OUT.',
+ '',
+ '',
+ 'DARKNESS',
+ ]))
+ self.assertEquals([Action, Transition, Slug], [type(p) for p in paras])
+ self.assertEquals(plain('FADE OUT.'), paras[1].line)
+
+ def test_transition_at_end(self):
+ paras = list(parse([
+ 'They stroll hand in hand down the street.',
+ '',
+ '> FADE OUT.',
+ ]))
+ self.assertEquals([Action, Transition], [type(p) for p in paras])
+ self.assertEquals(plain('FADE OUT.'), paras[1].line)
+
def test_multiline_paragraph(self):
"""Check that we don't join lines like Markdown does.
"""