From 10908e9db218ecd4dbdeeb704269e2dabffb72a5 Mon Sep 17 00:00:00 2001 From: Martin Vilcans Date: Mon, 20 Feb 2012 00:14:58 +0100 Subject: Added commenting out using /* boneyard */ --- tests/files/boneyard.fountain | 22 ++++++++++++++++++++++ tests/files/boneyard.fountain.html | 4 ++++ tests/files_test.py | 6 ++++++ tests/fountain_test.py | 7 ++++++- 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/files/boneyard.fountain create mode 100644 tests/files/boneyard.fountain.html (limited to 'tests') diff --git a/tests/files/boneyard.fountain b/tests/files/boneyard.fountain new file mode 100644 index 0000000..3d3adc2 --- /dev/null +++ b/tests/files/boneyard.fountain @@ -0,0 +1,22 @@ +As he rattles off the long list, Brick and Steel share a look. This is going to be BAD. + +CUT TO: +/* +INT. GARAGE - DAY + +BRICK and STEEL get into Mom's PORSCHE, Steel at the wheel. They pause for a beat, the gravity of the situation catching up with them. + +BRICK +This is everybody we've ever put away. + +STEEL +(starting the engine) +So much for retirement! + +They speed off. To destiny! + +CUT TO: +*/ +EXT. PALATIAL MANSION - DAY + +An EXTREMELY HANDSOME MAN drinks a beer. Shirtless, unfortunately. diff --git a/tests/files/boneyard.fountain.html b/tests/files/boneyard.fountain.html new file mode 100644 index 0000000..291581b --- /dev/null +++ b/tests/files/boneyard.fountain.html @@ -0,0 +1,4 @@ +

As he rattles off the long list, Brick and Steel share a look.  This is going to be BAD.

+
CUT TO:
+
EXT. PALATIAL MANSION - DAY
+

An EXTREMELY HANDSOME MAN drinks a beer.  Shirtless, unfortunately.

diff --git a/tests/files_test.py b/tests/files_test.py index 0f0cba0..46eb349 100644 --- a/tests/files_test.py +++ b/tests/files_test.py @@ -70,3 +70,9 @@ class ParseTests(unittest2.TestCase): 'sections.fountain', 'sections.html', 'sections.fountain.html', '--bare') self.assertMultiLineEqual(expected, actual) + + def test_boneyard(self): + actual, expected = self.convert( + 'boneyard.fountain', 'sections.html', + 'boneyard.fountain.html', '--bare') + self.assertMultiLineEqual(expected, actual) diff --git a/tests/fountain_test.py b/tests/fountain_test.py index 11a0939..5b1d386 100644 --- a/tests/fountain_test.py +++ b/tests/fountain_test.py @@ -3,12 +3,17 @@ # http://www.opensource.org/licenses/mit-license.php import unittest2 -from screenplain.parsers.fountain import parse from screenplain.parsers import fountain from screenplain.types import ( Slug, Action, Dialog, DualDialog, Transition, Section ) from screenplain.richstring import plain, italic, empty_string +from StringIO import StringIO + + +def parse(lines): + content = '\n'.join(lines) + return fountain.parse(StringIO(content)) class SlugTests(unittest2.TestCase): -- cgit v1.2.3