diff options
-rwxr-xr-x | test/fotree/disabled-testcases.xml | 10 | ||||
-rw-r--r-- | test/fotree/testcases/block-progression-dimension_negative.fo | 39 | ||||
-rw-r--r-- | test/fotree/testcases/inline-progression-dimension_negative.fo | 39 |
3 files changed, 88 insertions, 0 deletions
diff --git a/test/fotree/disabled-testcases.xml b/test/fotree/disabled-testcases.xml index 2b7ae2ad6..1ae6f553a 100755 --- a/test/fotree/disabled-testcases.xml +++ b/test/fotree/disabled-testcases.xml @@ -21,4 +21,14 @@ <file>demo-test-failure.fo</file> <description></description> </testcase> + <testcase> + <name>Negative values on block-progression-dimension</name> + <file>block-progression-dimension_negative.fo</file> + <description>The code currently doesn't set negative values to 0mpt as mandated by the spec.</description> + </testcase> + <testcase> + <name>Negative values on inline-progression-dimension</name> + <file>inline-progression-dimension_negative.fo</file> + <description>The code currently doesn't set negative values to 0mpt as mandated by the spec.</description> + </testcase> </disabled-testcases> diff --git a/test/fotree/testcases/block-progression-dimension_negative.fo b/test/fotree/testcases/block-progression-dimension_negative.fo new file mode 100644 index 000000000..6d8f3f891 --- /dev/null +++ b/test/fotree/testcases/block-progression-dimension_negative.fo @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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="A4" page-height="29.7cm" page-width="21cm" margin="2cm"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="A4"> + <fo:flow flow-name="xsl-region-body"> + <!-- See 7.14.1, XSL 1.0 --> + <!-- Positive values first --> + <fo:block-container block-progression-dimension="10pt"> + <test:assert property="block-progression-dimension.minimum" expected="10000mpt"/> + <test:assert property="block-progression-dimension.optimum" expected="10000mpt"/> + <test:assert property="block-progression-dimension.maximum" expected="10000mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + <fo:block-container block-progression-dimension.minimum="10pt" block-progression-dimension.optimum="20pt" block-progression-dimension.maximum="30pt"> + <test:assert property="block-progression-dimension.minimum" expected="10000mpt"/> + <test:assert property="block-progression-dimension.optimum" expected="20000mpt"/> + <test:assert property="block-progression-dimension.maximum" expected="30000mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + <!-- Negative values --> + <fo:block-container block-progression-dimension="-10pt"> + <test:assert property="block-progression-dimension.minimum" expected="0mpt"/> + <test:assert property="block-progression-dimension.optimum" expected="0mpt"/> + <test:assert property="block-progression-dimension.maximum" expected="0mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + <fo:block-container block-progression-dimension.minimum="-10pt" block-progression-dimension.optimum="-20pt" block-progression-dimension.maximum="-30pt"> + <test:assert property="block-progression-dimension.minimum" expected="0mpt"/> + <test:assert property="block-progression-dimension.optimum" expected="0mpt"/> + <test:assert property="block-progression-dimension.maximum" expected="0mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + </fo:flow> + </fo:page-sequence> +</fo:root> diff --git a/test/fotree/testcases/inline-progression-dimension_negative.fo b/test/fotree/testcases/inline-progression-dimension_negative.fo new file mode 100644 index 000000000..a575b33a3 --- /dev/null +++ b/test/fotree/testcases/inline-progression-dimension_negative.fo @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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="A4" page-height="29.7cm" page-width="21cm" margin="2cm"> + <fo:region-body/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="A4"> + <fo:flow flow-name="xsl-region-body"> + <!-- See 7.14.1, XSL 1.0 --> + <!-- Positive values first --> + <fo:block-container inline-progression-dimension="10pt"> + <test:assert property="inline-progression-dimension.minimum" expected="10000mpt"/> + <test:assert property="inline-progression-dimension.optimum" expected="10000mpt"/> + <test:assert property="inline-progression-dimension.maximum" expected="10000mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + <fo:block-container inline-progression-dimension.minimum="10pt" inline-progression-dimension.optimum="20pt" inline-progression-dimension.maximum="30pt"> + <test:assert property="inline-progression-dimension.minimum" expected="10000mpt"/> + <test:assert property="inline-progression-dimension.optimum" expected="20000mpt"/> + <test:assert property="inline-progression-dimension.maximum" expected="30000mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + <!-- Negative values --> + <fo:block-container inline-progression-dimension="-10pt"> + <test:assert property="inline-progression-dimension.minimum" expected="0mpt"/> + <test:assert property="inline-progression-dimension.optimum" expected="0mpt"/> + <test:assert property="inline-progression-dimension.maximum" expected="0mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + <fo:block-container inline-progression-dimension.minimum="-10pt" inline-progression-dimension.optimum="-20pt" inline-progression-dimension.maximum="-30pt"> + <test:assert property="inline-progression-dimension.minimum" expected="0mpt"/> + <test:assert property="inline-progression-dimension.optimum" expected="0mpt"/> + <test:assert property="inline-progression-dimension.maximum" expected="0mpt"/> + <fo:block>blah</fo:block> + </fo:block-container> + </fo:flow> + </fo:page-sequence> +</fo:root> |