]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Regression test for special case of multi-column2.xml.
authorJeremias Maerki <jeremias@apache.org>
Mon, 11 Jul 2005 07:10:55 +0000 (07:10 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 11 Jul 2005 07:10:55 +0000 (07:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@210075 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/testcases/multi-column2a.xml [new file with mode: 0644]

diff --git a/test/layoutengine/testcases/multi-column2a.xml b/test/layoutengine/testcases/multi-column2a.xml
new file mode 100644 (file)
index 0000000..1d41550
--- /dev/null
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!--\r
+  Copyright 2005 The Apache Software Foundation\r
+\r
+  Licensed under the Apache License, Version 2.0 (the "License");\r
+  you may not use this file except in compliance with the License.\r
+  You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+  Unless required by applicable law or agreed to in writing, software\r
+  distributed under the License is distributed on an "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+  See the License for the specific language governing permissions and\r
+  limitations under the License.\r
+-->\r
+<!-- $Id$ -->\r
+<testcase>\r
+  <info>\r
+    <p>\r
+      This test checks multi-column documents. This test is a special regression test \r
+      (a section that is not the first span group, is not spanned, is forced to be \r
+      balanced and breaks over a page).\r
+    </p>\r
+  </info>\r
+  <fo>\r
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">\r
+      <fo:layout-master-set>\r
+        <fo:simple-page-master master-name="normal" page-width="320pt" page-height="4in" margin="20pt">\r
+          <fo:region-body column-count="3" column-gap="10pt"/>\r
+        </fo:simple-page-master>\r
+      </fo:layout-master-set>\r
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">\r
+        <fo:flow flow-name="xsl-region-body">\r
+          <fo:block>\r
+            <fo:block>line1</fo:block>\r
+            <fo:block>line2</fo:block>\r
+            <fo:block>line3</fo:block>\r
+            <fo:block>line4</fo:block>\r
+            <fo:block>line5</fo:block>\r
+            <fo:block>line6</fo:block>\r
+            <fo:block>line7</fo:block>\r
+            <fo:block>line8</fo:block>\r
+            <fo:block>line9</fo:block>\r
+            <fo:block>line10</fo:block>\r
+            <fo:block>line11</fo:block>\r
+            <fo:block>line12</fo:block>\r
+            <fo:block>line13</fo:block>\r
+          </fo:block>\r
+          <fo:block span="all">\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+            <fo:block>This line is spanned over all columns.</fo:block>\r
+          </fo:block>\r
+          <fo:block> <!-- this is the interesting block for this test -->\r
+            <fo:block>line1</fo:block>\r
+            <fo:block>line2</fo:block>\r
+            <fo:block>line3</fo:block>\r
+            <fo:block>line4</fo:block>\r
+            <fo:block>line5</fo:block>\r
+            <fo:block>line6</fo:block>\r
+            <fo:block>line7</fo:block>\r
+            <fo:block>line8</fo:block>\r
+            <fo:block>line9</fo:block>\r
+            <fo:block>line10</fo:block>\r
+            <fo:block>line11</fo:block>\r
+            <fo:block>line12</fo:block>\r
+            <fo:block>line13</fo:block>\r
+            <fo:block>line14</fo:block>\r
+            <fo:block>line15</fo:block>\r
+            <fo:block>line16</fo:block>\r
+            <fo:block>line17</fo:block>\r
+            <fo:block>line18</fo:block>\r
+            <fo:block>line19</fo:block>\r
+            <fo:block>line20</fo:block>\r
+            <fo:block>line21</fo:block>\r
+            <fo:block>line22</fo:block>\r
+            <fo:block>line23</fo:block>\r
+            <fo:block>line24</fo:block>\r
+            <fo:block>line25</fo:block>\r
+          </fo:block>\r
+          <fo:block span="all"/>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="2" xpath="count(//pageViewport)"/>\r
+    \r
+    <eval expected="2" xpath="count(//pageViewport[@nr=1]//lineArea[.='line6'])"/>\r
+    <!-- the bug cause the second "line7" block to be painted on page 1 instead of 2 -->\r
+    <eval expected="1" xpath="count(//pageViewport[@nr=1]//lineArea[.='line7'])"/>\r
+    <eval expected="1" xpath="count(//pageViewport[@nr=2]//lineArea[.='line7'])"/>\r
+\r
+  </checks>\r
+</testcase>\r