aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Vilcans <martin@librador.com>2012-02-07 22:30:00 +0100
committerMartin Vilcans <martin@librador.com>2012-02-07 22:37:00 +0100
commitb9d9e51bcf448cfa777012bd3ea0fe1b5ad0c2ed (patch)
tree66adc53c8b49fc18d6e851cba67d913cc59eca55 /tests
parentef1635819c057f634cb776b9c57c7d1348b88c26 (diff)
downloadscreenplain-b9d9e51bcf448cfa777012bd3ea0fe1b5ad0c2ed.tar.gz
Read the spec again. Scene numbers are alphanumeric only.
Diffstat (limited to 'tests')
-rw-r--r--tests/spmd_test.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/spmd_test.py b/tests/spmd_test.py
index b317b56..21f39ae 100644
--- a/tests/spmd_test.py
+++ b/tests/spmd_test.py
@@ -72,9 +72,13 @@ class ParseTests(unittest2.TestCase):
self.assertEquals(plain('42'), paras[0].scene_number)
self.assertEquals(plain('INT ROOM #237'), paras[0].line)
- def test_scene_number_can_be_styled(self):
+ def test_scene_number_must_be_alphanumeric(self):
paras = parse(['.SOMEWHERE #*HELLO*#'])
- self.assertEquals(italic('HELLO'), paras[0].scene_number)
+ self.assertIsNone(paras[0].scene_number)
+ self.assertEquals(
+ (plain)(u'SOMEWHERE #') + (italic)(u'HELLO') + (plain)(u'#'),
+ 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.