aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2012-01-31 23:30:12 +0100
committerMartin Vilcans <martin@librador.com>2012-01-31 23:30:12 +0100
commit888addaa73f9615103fc70edd1e9a027755647e3 (patch)
treebec75dafc4fcf229c090d4f35dde6ad64b578caa /tests
parentc58355251be5d92892163f13bc927c28a65ad30b (diff)
downloadscreenplain-888addaa73f9615103fc70edd1e9a027755647e3.tar.gz
Changed rules for forced Scene Headings (slugs).
Double linebreaks no longer signify a slug. Instead you can force one with a leading period: e.g. FADE IN: .DARKNESS (whatever that would look like!?)
Diffstat (limited to 'tests')
-rw-r--r--tests/spmd_test.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index 52b2348..34fddf7 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -43,14 +43,24 @@ class ParseTests(unittest2.TestCase):
]))
self.assertEquals([Action], [type(p) for p in paras])
- def test_two_lines_creates_a_slug(self):
+ def test_two_lines_creates_no_slug(self):
types = [type(p) for p in parse([
'',
'',
'This is a slug',
'',
])]
- self.assertEquals([Slug], types)
+ # This used to be Slug. Changed in the Jan 2012 version of the spec.
+ self.assertEquals([Action], types)
+
+ def test_period_creates_slug(self):
+ paras = parse([
+ '.SNIPER SCOPE POV',
+ '',
+ ])
+ self.assertEquals(1, len(paras))
+ self.assertEquals(Slug, type(paras[0]))
+ self.assertEquals(plain('SNIPER SCOPE POV'), paras[0].line)
# A Character element is any line entirely in caps, with one empty
# line before it and without an empty line after it.
@@ -196,8 +206,7 @@ class ParseTests(unittest2.TestCase):
'',
'> FADE OUT.',
'',
- '',
- 'DARKNESS',
+ '.DARKNESS',
]))
self.assertEquals([Action, Transition, Slug], [type(p) for p in paras])
self.assertEquals(plain('FADE OUT.'), paras[1].line)