diff options
-rw-r--r-- | test/layoutengine/disabled-testcases.txt | 2 | ||||
-rw-r--r-- | test/layoutengine/testcases/breaks1.xml | 65 | ||||
-rw-r--r-- | test/layoutengine/testcases/breaks2.xml | 65 |
3 files changed, 132 insertions, 0 deletions
diff --git a/test/layoutengine/disabled-testcases.txt b/test/layoutengine/disabled-testcases.txt index e69de29bb..91ab31018 100644 --- a/test/layoutengine/disabled-testcases.txt +++ b/test/layoutengine/disabled-testcases.txt @@ -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 index 000000000..758a2b1bb --- /dev/null +++ b/test/layoutengine/testcases/breaks1.xml @@ -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 index 000000000..9a259df9b --- /dev/null +++ b/test/layoutengine/testcases/breaks2.xml @@ -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> |