aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/richstring_test.py3
-rw-r--r--tests/spmd_test.py15
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/richstring_test.py b/tests/richstring_test.py
index 258cdb1..b442f90 100644
--- a/tests/richstring_test.py
+++ b/tests/richstring_test.py
@@ -32,6 +32,9 @@ class RichStringOperatorTests(unittest2.TestCase):
class RichStringTests(unittest2.TestCase):
+ def test_plain_to_html(self):
+ self.assertEquals('hello', RichString('hello').to_html())
+
def test_to_html(self):
s = RichString(
Bold('bold'),
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index d4e8c5d..1c25f05 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -104,6 +104,21 @@ class ParseTests(unittest2.TestCase):
self.assertEquals('STEEL', dual.right.character)
self.assertEquals([(False, 'Fuck retirement!')], dual.right.blocks)
+ def test_dual_dialog_with_empty_right_dialog_is_ordinary_dialog(self):
+ paras = list(parse([
+ 'BRICK',
+ 'Nice retirement.',
+ '||',
+ ]))
+ self.assertEquals([Dialog], [type(p) for p in paras])
+ dialog = paras[0]
+ self.assertEqual('BRICK', dialog.character)
+ self.assertEqual([
+ (False, 'Nice retirement.'),
+ (False, '||')
+ ], dialog.blocks)
+
+
def test_standard_transition(self):
paras = list(parse([