]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Test case for wrap-option on fo:block.
authorJeremias Maerki <jeremias@apache.org>
Fri, 7 Oct 2005 11:56:05 +0000 (11:56 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 7 Oct 2005 11:56:05 +0000 (11:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@307092 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/testcases/block_wrap-option.xml [new file with mode: 0644]

diff --git a/test/layoutengine/testcases/block_wrap-option.xml b/test/layoutengine/testcases/block_wrap-option.xml
new file mode 100644 (file)
index 0000000..40e6437
--- /dev/null
@@ -0,0 +1,57 @@
+<?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 the wrap-option property on fo:block.\r
+    </p>\r
+  </info>\r
+  <fo>\r
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">\r
+      <fo:layout-master-set>\r
+        <fo:simple-page-master master-name="simple" page-height="6cm" page-width="21cm">\r
+          <fo:region-body/>\r
+        </fo:simple-page-master>\r
+      </fo:layout-master-set>\r
+      <fo:page-sequence master-reference="simple">\r
+        <fo:flow flow-name="xsl-region-body">\r
+          <fo:block-container width="5cm" background-color="lightgray">\r
+            <fo:block background-color="yellow">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas et ligula. Suspendisse faucibus. Donec porta risus vitae turpis.</fo:block>\r
+            <fo:block background-color="orange" wrap-option="no-wrap">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas et ligula. Suspendisse faucibus. Donec porta risus vitae turpis.</fo:block>\r
+          </fo:block-container>\r
+        </fo:flow>\r
+      </fo:page-sequence>\r
+    </fo:root>\r
+  </fo>\r
+  <checks>\r
+    <element-list category="breaker">\r
+      <box w="14400"/> <!-- first block, first line -->\r
+      <box w="14400"/>\r
+      <penalty w="0" p="0"/>\r
+      <box w="14400"/>\r
+      <penalty w="0" p="0"/>\r
+      <box w="14400"/>\r
+      <penalty w="0" p="0"/>\r
+      <box w="14400"/>\r
+      <box w="14400"/> <!-- first block, last line -->\r
+      <penalty w="0" p="0"/>\r
+      <box w="14400"/> <!-- second block, same content, not broken -->\r
+      <skip>3</skip>\r
+    </element-list>\r
+  </checks>\r
+</testcase>\r