aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/spmd_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index 4a04660..5df8395 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -17,6 +17,19 @@ class ParseTests(unittest2.TestCase):
]))
self.assertEquals([Slug, Action], [type(p) for p in paras])
+ def test_slug_must_be_single_line(self):
+ paras = list(parse([
+ 'INT. SOMEWHERE - DAY',
+ 'ANOTHER LINE',
+ '',
+ 'Some action',
+ ]))
+ self.assertEquals([Dialog, Action], [type(p) for p in paras])
+ # What looks like a scene headingis parsed as a character name.
+ # Unexpected perhaps, but that's how I interpreted the spec.
+ self.assertEquals('INT. SOMEWHERE - DAY', paras[0].character)
+ self.assertEquals(['Some action'], paras[1].lines)
+
def test_action_is_not_a_slug(self):
paras = list(parse([
'',