diff options
author | Andreas L. Delmelle <adelmelle@apache.org> | 2008-05-31 10:56:05 +0000 |
---|---|---|
committer | Andreas L. Delmelle <adelmelle@apache.org> | 2008-05-31 10:56:05 +0000 |
commit | 317f7adb1f67ae5da04b91c507611987c29c41b9 (patch) | |
tree | a999284c01e6dd24b4022c8dd9955f281554936f /test | |
parent | 5c497ef1635e4141fb4bbba0d85ebe9fcabd0f5c (diff) | |
download | xmlgraphics-fop-317f7adb1f67ae5da04b91c507611987c29c41b9.tar.gz xmlgraphics-fop-317f7adb1f67ae5da04b91c507611987c29c41b9.zip |
Bugzilla 45097:
Leading/trailing white-space not removed from nested inline-content when there is no preceding/following text.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@661999 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml b/test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml new file mode 100644 index 000000000..bfe89c673 --- /dev/null +++ b/test/layoutengine/standard-testcases/inline_white-space-treatment_bugzilla45097.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You 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 for white-space related bugs as reported in Bugzilla 45097. + </p> + </info> + <fo> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + <fo:layout-master-set> + <fo:simple-page-master master-name="all-pages" margin-top="0.5in" margin-bottom="0.5in" margin-left="0.38in" margin-right="0.38in" page-width="8.5in" page-height="11in"> + <fo:region-body margin-top="0.5in + 1mm" margin-bottom="0.5in + 1mm"/> + <fo:region-before extent="0.5in"/> + <fo:region-after extent="0.5in"/> + </fo:simple-page-master> + </fo:layout-master-set> + <fo:page-sequence master-reference="all-pages"> + <fo:static-content flow-name="xsl-region-before"><fo:block/></fo:static-content> + <fo:static-content flow-name="xsl-region-after"><fo:block/></fo:static-content> + <fo:flow flow-name="xsl-region-body"> + <fo:block> + <fo:block><fo:leader leader-pattern="space"/></fo:block> + <fo:block text-decoration="underline">Example 1: white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve"</fo:block> + <fo:block font-family="Courier" + white-space-collapse="false" + linefeed-treatment="preserve" + white-space-treatment="preserve"><fo:block><fo:inline id="inline-1a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-1b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block> + + <fo:block><fo:leader leader-pattern="space"/></fo:block> + <fo:block text-decoration="underline">Example 2: white-space-collapse="false" linefeed-treatment="preserve" w/ inlines</fo:block> + <fo:block font-family="Courier" + white-space-collapse="false" + linefeed-treatment="preserve"><fo:block><fo:inline id="inline-2a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-2b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block> + + </fo:block> + <fo:block><fo:leader leader-pattern="space"/></fo:block> + <fo:block text-decoration="underline">Example 1: white-space-collapse="false" linefeed-treatment="preserve" white-space-treatment="preserve"</fo:block> + <fo:block font-family="Courier" + white-space-collapse="false" + linefeed-treatment="preserve" + white-space-treatment="preserve"><fo:block><fo:inline id="inline-3a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-3b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block> + + <fo:block><fo:leader leader-pattern="space"/></fo:block> + <fo:block text-decoration="underline">Example 2: white-space-collapse="false" linefeed-treatment="preserve" w/ inlines</fo:block> + <fo:block font-family="Courier" + white-space-collapse="false" + linefeed-treatment="preserve"><fo:block><fo:inline id="inline-4a" border="1mm solid red"> *** </fo:inline></fo:block><fo:block><fo:inline border="1mm solid red">*************</fo:inline></fo:block><fo:block><fo:inline id="inline-4b" border="1mm solid red"> *** </fo:inline></fo:block></fo:block> + </fo:flow> + </fo:page-sequence> + </fo:root> + </fo> + <checks> + <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-1a']//space)" /> + <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-1b']//space)" /> + <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-2a']//space)" /> + <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-2b']//space)" /> + <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-3a']//space)" /> + <eval expected="10" xpath="count(//inlineparent[@prod-id='inline-3b']//space)" /> + <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-4a']//space)" /> + <eval expected="0" xpath="count(//inlineparent[@prod-id='inline-4b']//space)" /> + </checks> +</testcase>
\ No newline at end of file |