]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Test space-after, too, in list4.
authorJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 07:44:22 +0000 (07:44 +0000)
committerJeremias Maerki <jeremias@apache.org>
Tue, 26 Jul 2005 07:44:22 +0000 (07:44 +0000)
Cloned list4 to list4a which is modified slightly to check for differing min/opt/max values. This one currently breaks as it is not properly handled, yet.
Updated disabled testcases.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225250 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/disabled-testcases.txt
test/layoutengine/testcases/list4.xml
test/layoutengine/testcases/list4a.xml [new file with mode: 0644]

index 1ee4231b685acf0f5b722a0c15ebe0a4fd5aaa45..989b5dcc97a85a14eedbfc078d6ba7ac9e6dc180 100644 (file)
@@ -5,7 +5,7 @@ keep-with-previous2.xml
 keep-with-previous3.xml
 keep-with-previous4.xml
 keep-with-previous5.xml
-list4.xml
+list4a.xml
 multi-column3.xml
 normal-breaking4.xml
 table-border-collapse1.xml
index 10ab1c936b38caff36d14b53d0bc3b86a494c3ae..e863593aeea341cf8b3ea34986250ee3ab29507c 100644 (file)
@@ -18,7 +18,7 @@
 <testcase>\r
   <info>\r
     <p>\r
-      This test checks lists. Checks for the presence of space-before on list-items.\r
+      This test checks lists. Checks for the presence of space-before and space-after on list-items.\r
     </p>\r
   </info>\r
   <fo>\r
@@ -49,7 +49,7 @@
                 <fo:block>here is text in the list item body</fo:block>\r
               </fo:list-item-body>\r
             </fo:list-item>\r
-            <fo:list-item space-before="1em">\r
+            <fo:list-item space-before="1em" space-after="1em">\r
               <fo:list-item-label end-indent="label-end()">\r
                 <fo:block>•</fo:block>\r
               </fo:list-item-label>\r
@@ -57,7 +57,7 @@
                 <fo:block>here is text in the list item body</fo:block>\r
               </fo:list-item-body>\r
             </fo:list-item>\r
-            <fo:list-item space-before="1em">\r
+            <fo:list-item space-after="1em">\r
               <fo:list-item-label end-indent="label-end()">\r
                 <fo:block>•</fo:block>\r
               </fo:list-item-label>\r
@@ -65,7 +65,7 @@
                 <fo:block>here is text in the list item body</fo:block>\r
               </fo:list-item-body>\r
             </fo:list-item>\r
-            <fo:list-item space-before="1em">\r
+            <fo:list-item>\r
               <fo:list-item-label end-indent="label-end()">\r
                 <fo:block>•</fo:block>\r
               </fo:list-item-label>\r
       <penalty w="0" p="0"/>\r
       <glue w="12000"/>\r
       <box w="14400"/>\r
-      <penalty w="0" p="0"/>\r
       <glue w="12000"/>\r
       <box w="14400"/>\r
-      <penalty w="0" p="0"/>\r
       <glue w="12000"/>\r
       <box w="14400"/>\r
       <skip>3</skip>\r
diff --git a/test/layoutengine/testcases/list4a.xml b/test/layoutengine/testcases/list4a.xml
new file mode 100644 (file)
index 0000000..544414d
--- /dev/null
@@ -0,0 +1,110 @@
+<?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 lists. Checks for the presence of space-before and space-after \r
+      on list-items. In this case, min/opt/max don't have the same value.\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="5in" page-height="2in" \r
+              margin="20pt">\r
+          <fo:region-body background-color="yellow"/>\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>test</fo:block>\r
+          <fo:list-block provisional-distance-between-starts="50pt" provisional-label-separation="5pt">\r
+            <fo:list-item space-before.optimum="1em">\r
+              <fo:list-item-label end-indent="label-end()">\r
+                <fo:block>•</fo:block>\r
+              </fo:list-item-label>\r
+              <fo:list-item-body start-indent="body-start()">\r
+                <fo:block>here is text in the list item body</fo:block>\r
+              </fo:list-item-body>\r
+            </fo:list-item>\r
+            <fo:list-item space-before.optimum="1em">\r
+              <fo:list-item-label end-indent="label-end()">\r
+                <fo:block>•</fo:block>\r
+              </fo:list-item-label>\r
+              <fo:list-item-body start-indent="body-start()">\r
+                <fo:block>here is text in the list item body</fo:block>\r
+              </fo:list-item-body>\r
+            </fo:list-item>\r
+            <fo:list-item space-before.optimum="1em" space-after.optimum="1em">\r
+              <fo:list-item-label end-indent="label-end()">\r
+                <fo:block>•</fo:block>\r
+              </fo:list-item-label>\r
+              <fo:list-item-body start-indent="body-start()">\r
+                <fo:block>here is text in the list item body</fo:block>\r
+              </fo:list-item-body>\r
+            </fo:list-item>\r
+            <fo:list-item space-after.optimum="1em">\r
+              <fo:list-item-label end-indent="label-end()">\r
+                <fo:block>•</fo:block>\r
+              </fo:list-item-label>\r
+              <fo:list-item-body start-indent="body-start()">\r
+                <fo:block>here is text in the list item body</fo:block>\r
+              </fo:list-item-body>\r
+            </fo:list-item>\r
+            <fo:list-item>\r
+              <fo:list-item-label end-indent="label-end()">\r
+                <fo:block>•</fo:block>\r
+              </fo:list-item-label>\r
+              <fo:list-item-body start-indent="body-start()">\r
+                <fo:block>here is text in the list item body</fo:block>\r
+              </fo:list-item-body>\r
+            </fo:list-item>\r
+          </fo:list-block>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <eval expected="2" xpath="count(//pageViewport)"/>\r
+    \r
+    <!-- The following check makes sure that the content doesn't overlap the available region -->\r
+    <true xpath="//pageViewport[@nr=1]/page/regionViewport/regionBody/mainReference/span/@bpda &lt;= //pageViewport[@nr=1]/page/regionViewport/regionBody/@bpda"\r
+        fail-msg="The span content must not exceed the available space given by the region-body!"/>\r
+    <!-- This check currently breaks because the breaker uses the minimum values (0pt) \r
+      instead of optimum and the addAreas stage doesn't create smaller space-before/after \r
+      spacers. -->\r
+    \r
+    <element-list category="breaker">\r
+      <box w="14400"/>\r
+      <penalty w="0" p="0"/>\r
+      <glue w="12000"/> <!-- TODO Check shrink/stretch -->\r
+      <box w="14400"/>\r
+      <penalty w="0" p="0"/>\r
+      <glue w="12000"/>\r
+      <box w="14400"/>\r
+      <penalty w="0" p="0"/>\r
+      <glue w="12000"/>\r
+      <box w="14400"/>\r
+      <glue w="12000"/>\r
+      <box w="14400"/>\r
+      <glue w="12000"/>\r
+      <box w="14400"/>\r
+      <skip>3</skip>\r
+    </element-list>\r
+  </checks>\r
+</testcase>\r