aboutsummaryrefslogtreecommitdiffstats
path: root/test/fotree
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2005-09-15 10:35:07 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2005-09-15 10:35:07 +0000
commit051501e7459d8a204d820213b5cc6854a2054722 (patch)
tree8fb72d1088aaf117d1eef238130539866b3272aa /test/fotree
parent7fb5d7bcea9dff5f6044faa2f7ed7676cf0c232a (diff)
downloadxmlgraphics-fop-051501e7459d8a204d820213b5cc6854a2054722.tar.gz
xmlgraphics-fop-051501e7459d8a204d820213b5cc6854a2054722.zip
Simple testcase for initial value of column-number -- tables without explicit rows
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@289195 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/fotree')
-rw-r--r--test/fotree/testcases/column-number_body.fo145
1 files changed, 145 insertions, 0 deletions
diff --git a/test/fotree/testcases/column-number_body.fo b/test/fotree/testcases/column-number_body.fo
new file mode 100644
index 000000000..48dd9c3f0
--- /dev/null
+++ b/test/fotree/testcases/column-number_body.fo
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:test="http://xmlgraphics.apache.org/fop/test">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="2in"
+ margin="20pt">
+ <fo:region-body background-color="yellow"/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence id="page-sequence1" master-reference="normal" white-space-collapse="true">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>The following table has explicit columns.</fo:block>
+ <fo:table table-layout="fixed" border-collapse="separate">
+ <fo:table-column column-width="proportional-column-width(1)">
+ <test:assert property="column-number" expected="1" />
+ </fo:table-column>
+ <fo:table-column column-width="proportional-column-width(2)">
+ <test:assert property="column-number" expected="2" />
+ </fo:table-column>
+ <fo:table-column column-width="proportional-column-width(1)">
+ <test:assert property="column-number" expected="3" />
+ </fo:table-column>
+ <fo:table-header>
+ <fo:table-cell number-columns-spanned="3" starts-row="true" ends-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>header cell</fo:block>
+ </fo:table-cell>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-cell starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>footer cell 1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <test:assert property="column-number" expected="2" />
+ <fo:block>footer cell 2</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>footer cell 3</fo:block>
+ </fo:table-cell>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-cell number-columns-spanned="2" starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>body-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-rows-spanned="2" starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <test:assert property="column-number" expected="2" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-rows-spanned="2" starts-row="true">
+ <test:assert property="column-number" expected="2" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ </fo:table-body>
+ </fo:table>
+ <fo:block>The following table has implicit columns.</fo:block>
+ <fo:table table-layout="fixed" border-collapse="separate">
+ <fo:table-header>
+ <fo:table-cell number-columns-spanned="3" starts-row="true" ends-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>header cell</fo:block>
+ </fo:table-cell>
+ </fo:table-header>
+ <fo:table-footer>
+ <fo:table-cell starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>footer cell 1</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <test:assert property="column-number" expected="2" />
+ <fo:block>footer cell 2</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>footer cell 3</fo:block>
+ </fo:table-cell>
+ </fo:table-footer>
+ <fo:table-body>
+ <fo:table-cell number-columns-spanned="2" starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>body-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-rows-spanned="2" starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell>
+ <test:assert property="column-number" expected="2" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell number-rows-spanned="2" starts-row="true">
+ <test:assert property="column-number" expected="2" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell starts-row="true">
+ <test:assert property="column-number" expected="1" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ <fo:table-cell ends-row="true">
+ <test:assert property="column-number" expected="3" />
+ <fo:block>cell-content</fo:block>
+ </fo:table-cell>
+ </fo:table-body>
+ </fo:table>
+ </fo:flow>
+ </fo:page-sequence>
+</fo:root>