add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
authorrgbecker
Wed, 12 Jul 2006 07:48:21 +0000
changeset 2659 08af1b8a5d05
parent 2658 a5bab09f188d
child 2660 c147aff8edae
add Indenter vs keepWithNext breakage found by Ilpo Nyyssönen
reportlab/test/test_platypus_breaking.py
--- a/reportlab/test/test_platypus_breaking.py	Mon Jul 10 12:57:15 2006 +0000
+++ b/reportlab/test/test_platypus_breaking.py	Wed Jul 12 07:48:21 2006 +0000
@@ -20,7 +20,7 @@
 from reportlab.platypus.paragraph import Paragraph
 from reportlab.platypus.frames import Frame
 from reportlab.lib.randomtext import randomText, PYTHON
-from reportlab.platypus.doctemplate import PageTemplate, BaseDocTemplate
+from reportlab.platypus.doctemplate import PageTemplate, BaseDocTemplate, Indenter, SimpleDocTemplate
 from reportlab.platypus.paragraph import *
 
 
@@ -100,6 +100,18 @@
     def test0(self):
         _test0(self)
 
+    def test1(self):
+        '''Ilpo Nyyssnen posted this broken test'''
+        normalStyle = ParagraphStyle(name = 'normal')
+        keepStyle = ParagraphStyle(name = 'keep', keepWithNext = True)
+        content = [
+            Paragraph("line 1", keepStyle),
+            Indenter(left = 1 * cm),
+            Paragraph("line 2", normalStyle),
+            ]
+        doc = SimpleDocTemplate(outputfile('test_platypus_breaking1.pdf'))
+        doc.build(content)
+
 
 def makeSuite():
     return makeSuiteForClasses(BreakingTestCase)