aboutsummaryrefslogtreecommitdiffstats
path: root/tests/spmd_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spmd_test.py')
-rw-r--r--tests/spmd_test.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index 28078c0..2efa2d4 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -5,7 +5,7 @@
import unittest2
from screenplain.parsers.spmd import parse
from screenplain.types import Slug, Action, Dialog, DualDialog, Transition
-from screenplain.richstring import plain
+from screenplain.richstring import plain, empty_string
class ParseTests(unittest2.TestCase):
@@ -100,6 +100,20 @@ class ParseTests(unittest2.TestCase):
dialog.blocks[1]
)
+ def test_twospace_keeps_dialog_together(self):
+ paras = list(parse([
+ 'SOMEONE',
+ 'One',
+ ' ',
+ 'Two',
+ ]))
+ self.assertEquals([Dialog], [type(p) for p in paras])
+ self.assertEquals([
+ (False, plain('One')),
+ (False, empty_string),
+ (False, plain('Two')),
+ ], paras[0].blocks)
+
def test_dual_dialog(self):
paras = list(parse([
'BRICK',