]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Two basic tests for break-before|after on blocks (currently disabled because they...
authorJeremias Maerki <jeremias@apache.org>
Mon, 31 Jan 2005 13:17:12 +0000 (13:17 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 31 Jan 2005 13:17:12 +0000 (13:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198345 13f79535-47bb-0310-9956-ffa450edef68

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

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..91ab3101882f5dbb6698870f0aa62671fb9f8d8f 100644 (file)
@@ -0,0 +1,2 @@
+breaks1.xml
+breaks2.xml
\ No newline at end of file
diff --git a/test/layoutengine/testcases/breaks1.xml b/test/layoutengine/testcases/breaks1.xml
new file mode 100644 (file)
index 0000000..758a2b1
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks basic breaks.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block>line1</fo:block>
+          <fo:block break-before="column">line2</fo:block>
+          <fo:block>line3</fo:block>
+          <fo:block break-before="page">line4</fo:block>
+          <fo:block>line5</fo:block>
+          <fo:block break-before="even-page">line6</fo:block>
+          <fo:block>line7</fo:block>
+          <fo:block break-before="even-page">line8</fo:block>
+          <fo:block>line9</fo:block>
+          <fo:block break-before="odd-page">line10</fo:block>
+          <fo:block>line11</fo:block>
+          <fo:block break-before="odd-page">line12</fo:block>
+          <fo:block>line13</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="1" xpath="//text[. = 'line1']/../../../../../../../../../@nr"/>
+    <eval expected="2" xpath="//text[. = 'line2']/../../../../../../../../../@nr"/>
+    <eval expected="2" xpath="//text[. = 'line3']/../../../../../../../../../@nr"/>
+    <eval expected="3" xpath="//text[. = 'line4']/../../../../../../../../../@nr"/>
+    <eval expected="3" xpath="//text[. = 'line5']/../../../../../../../../../@nr"/>
+    <eval expected="4" xpath="//text[. = 'line6']/../../../../../../../../../@nr"/>
+    <eval expected="4" xpath="//text[. = 'line7']/../../../../../../../../../@nr"/>
+    <eval expected="6" xpath="//text[. = 'line8']/../../../../../../../../../@nr"/>
+    <eval expected="6" xpath="//text[. = 'line9']/../../../../../../../../../@nr"/>
+    <eval expected="7" xpath="//text[. = 'line10']/../../../../../../../../../@nr"/>
+    <eval expected="7" xpath="//text[. = 'line11']/../../../../../../../../../@nr"/>
+    <eval expected="9" xpath="//text[. = 'line12']/../../../../../../../../../@nr"/>
+    <eval expected="9" xpath="//text[. = 'line13']/../../../../../../../../../@nr"/>
+  </checks>
+</testcase>
diff --git a/test/layoutengine/testcases/breaks2.xml b/test/layoutengine/testcases/breaks2.xml
new file mode 100644 (file)
index 0000000..9a259df
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+  <info>
+    <p>
+      This test checks basic breaks.
+    </p>
+  </info>
+  <fo>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg">
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+          <fo:region-body/>
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+      <fo:page-sequence master-reference="normal" white-space-collapse="true">
+        <fo:flow flow-name="xsl-region-body">
+          <fo:block break-after="column">line1</fo:block>
+          <fo:block>line2</fo:block>
+          <fo:block break-after="page">line3</fo:block>
+          <fo:block>line4</fo:block>
+          <fo:block break-after="even-page">line5</fo:block>
+          <fo:block>line6</fo:block>
+          <fo:block break-after="even-page">line7</fo:block>
+          <fo:block>line8</fo:block>
+          <fo:block break-after="odd-page">line9</fo:block>
+          <fo:block>line10</fo:block>
+          <fo:block break-after="odd-page">line11</fo:block>
+          <fo:block>line12</fo:block>
+          <fo:block>line13</fo:block>
+        </fo:flow>
+      </fo:page-sequence>
+    </fo:root>
+  </fo>
+  <checks>
+    <eval expected="1" xpath="//text[. = 'line1']/../../../../../../../../../@nr"/>
+    <eval expected="2" xpath="//text[. = 'line2']/../../../../../../../../../@nr"/>
+    <eval expected="2" xpath="//text[. = 'line3']/../../../../../../../../../@nr"/>
+    <eval expected="3" xpath="//text[. = 'line4']/../../../../../../../../../@nr"/>
+    <eval expected="3" xpath="//text[. = 'line5']/../../../../../../../../../@nr"/>
+    <eval expected="4" xpath="//text[. = 'line6']/../../../../../../../../../@nr"/>
+    <eval expected="4" xpath="//text[. = 'line7']/../../../../../../../../../@nr"/>
+    <eval expected="6" xpath="//text[. = 'line8']/../../../../../../../../../@nr"/>
+    <eval expected="6" xpath="//text[. = 'line9']/../../../../../../../../../@nr"/>
+    <eval expected="7" xpath="//text[. = 'line10']/../../../../../../../../../@nr"/>
+    <eval expected="7" xpath="//text[. = 'line11']/../../../../../../../../../@nr"/>
+    <eval expected="9" xpath="//text[. = 'line12']/../../../../../../../../../@nr"/>
+    <eval expected="9" xpath="//text[. = 'line13']/../../../../../../../../../@nr"/>
+  </checks>
+</testcase>