reportlab/test/test_platypus_general.py
changeset 2885 b8a467b98da9
parent 2813 2b9091df4470
child 2955 cc16265295fb
--- a/reportlab/test/test_platypus_general.py	Thu Nov 01 10:33:11 2007 +0000
+++ b/reportlab/test/test_platypus_general.py	Fri Nov 02 17:08:26 2007 +0000
@@ -569,11 +569,24 @@
         "Make a platypus document"
         run()
 
+    def test1(self):
+        #test from Wietse Jacobs
+        from reportlab.lib.styles import ParagraphStyle
+        from reportlab.graphics.shapes import Drawing, Rect
+        from reportlab.platypus import SimpleDocTemplate
+        normal = ParagraphStyle(name='Normal', fontName='Helvetica', fontSize=8.5, leading=11)
+        header = ParagraphStyle(name='Heading1', parent=normal, fontSize=14, leading=19,
+                    spaceAfter=6, keepWithNext=1)
+        d = Drawing(400, 200)
+        d.add(Rect(50, 50, 300, 100))
+
+        story = [Paragraph("The section header", header), d]
+        doc = SimpleDocTemplate('test_drawing_keepwithnext.pdf')
+        doc.build(story)
 
 def makeSuite():
     return makeSuiteForClasses(PlatypusTestCase)
 
-
 #noruntests
 if __name__ == "__main__":
     if '-debug' in sys.argv: