diff options
author | Martin Vilcans <martin@librador.com> | 2012-02-07 22:30:00 +0100 |
---|---|---|
committer | Martin Vilcans <martin@librador.com> | 2012-02-07 22:37:00 +0100 |
commit | b9d9e51bcf448cfa777012bd3ea0fe1b5ad0c2ed (patch) | |
tree | 66adc53c8b49fc18d6e851cba67d913cc59eca55 /tests/spmd_test.py | |
parent | ef1635819c057f634cb776b9c57c7d1348b88c26 (diff) | |
download | screenplain-b9d9e51bcf448cfa777012bd3ea0fe1b5ad0c2ed.tar.gz |
Read the spec again. Scene numbers are alphanumeric only.
Diffstat (limited to 'tests/spmd_test.py')
-rw-r--r-- | tests/spmd_test.py | 8 |
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. |