Hi Andreas,

I was doing a stupid thing by putting the test file into a wrong directory. Sorry for the unnecessary confusion. I have made the attached testcase again for the same bug and the test is working with the svn copy I have. Could you please check it out for me?


Thank you,
Drashan

On 25/05/11 04:08, Andreas L. Delmelle wrote:
On 24 May 2011, at 03:35, darshan wrote:

Hi Darshan

<snip />

5. I found out the xpath values using the firefox extention XPather and then 
filled in the checks accordingly.
OK, that works too and looks comprehensive.
There is an easier way, though. If you have FOP set up in an IDE (Eclipse, IntelliJ 
IDEA...), then, as mentioned on the Wiki, you can just "set up a JUnit Launch 
configuration", which will allow you to run the test from within your IDE. That's 
where those variables come into play. If you do not set them, the entire test suite will 
be run. Specifying '-Dfop.layoutengine.starts-with=...' as a VM parameter would only run 
those tests whose name starts with the specified string, etc.

In that case, you have the benefit of the standard output we normally get when 
running the test suite (see the output I posted earlier). If the test passes, 
you should also get a clear indication that none of the checks failed and the 
test finished successfully.

I have attached the .at files as well.

Also does follow-up attachment mean that I attached the file to the bugreport 
https://issues.apache.org/bugzilla/show_bug.cgi?id=50196 and close it?
Indeed. If we confirmed it on our end, we will then add the test to our suite, 
and everything remains available in Bugzilla for future reference. If we cannot 
verify that it has been fixed, we will reopen and will ask you to re-examine.

Thanks!

Regards

Andreas
---

<?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: table-header_table-footer_padding.xml  2011-05-27 18:22:06Z darshan $ -->
<testcase>
  <info>
    <p>
      This test checks headers and footers left inline padding after a page break.
    </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:table table-layout="fixed" width="100%">
            <fo:table-column number-columns-repeated="2" column-width="proportional-column-width(1)"/>
            <fo:table-header>
              <fo:table-row background-color="yellow">
                <fo:table-cell>
                  <fo:block><fo:inline padding-left="20">header</fo:inline></fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block><fo:inline padding-left="20">start of page</fo:inline><fo:page-number/></fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-header>
            <fo:table-footer>
              <fo:table-row background-color="orange">
                <fo:table-cell>
                  <fo:block><fo:inline padding-left="20">footer</fo:inline></fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block><fo:inline padding-left="20">end of page</fo:inline><fo:page-number/></fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-footer>
            <fo:table-body>
              <fo:table-row height="100pt">
                <fo:table-cell>
                  <fo:block>cell1</fo:block>
                </fo:table-cell>
                <fo:table-cell background-color="lightgray">
                  <fo:block>cell2</fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row height="100pt">
                <fo:table-cell background-color="lightgray">
                  <fo:block>cell3</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>cell4</fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row height="100pt">
                <fo:table-cell>
                  <fo:block>cell5</fo:block>
                </fo:table-cell>
                <fo:table-cell background-color="lightgray">
                  <fo:block>cell6</fo:block>
                </fo:table-cell>
              </fo:table-row>
              <fo:table-row height="100pt">
                <fo:table-cell background-color="lightgray">
                  <fo:block>cell7</fo:block>
                </fo:table-cell>
                <fo:table-cell>
                  <fo:block>cell8</fo:block>
                </fo:table-cell>
              </fo:table-row>
            </fo:table-body>
          </fo:table>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </fo>
  <checks>

   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[2]/block/lineArea/inlineparent/@padding-start"/>
   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[4]/block/lineArea/inlineparent/@padding-start"/>
   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[12]/block/lineArea/inlineparent/@padding-start"/>
   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[14]/block/lineArea/inlineparent/@padding-start"/>
   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[2]/block/lineArea/inlineparent/@padding-start"/>
   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[4]/block/lineArea/inlineparent/@padding-start"/>
   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[8]/block/lineArea/inlineparent/@padding-start"/>
   <eval expected="20000" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[10]/block/lineArea/inlineparent/@padding-start"/>

   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[2]/block/lineArea/inlineparent/@bap"/>
   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[4]/block/lineArea/inlineparent/@bap"/>
   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[12]/block/lineArea/inlineparent/@bap"/>
   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/mainReference/span/flow/block/block[14]/block/lineArea/inlineparent/@bap"/>
   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[2]/block/lineArea/inlineparent/@bap"/>
   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[4]/block/lineArea/inlineparent/@bap"/>
   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[8]/block/lineArea/inlineparent/@bap"/>
   <eval expected="20000 0 0 0" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/mainReference/span/flow/block/block[10]/block/lineArea/inlineparent/@bap"/>

   <eval expected="0" xpath="/areaTree/pageSequence/pageViewport[1]/page/regionViewport/regionBody/footnote/@top-offset"/>
   <eval expected="0" xpath="/areaTree/pageSequence/pageViewport[2]/page/regionViewport/regionBody/footnote/@top-offset"/>

  </checks>
</testcase>

Reply via email to