You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pi...@apache.org on 2005/11/18 09:56:24 UTC

svn commit: r345474 - in /xmlgraphics/fop/trunk: ./ test/fotree/ test/java/org/apache/fop/layoutengine/ test/layoutengine/

Author: pietsch
Date: Fri Nov 18 00:56:06 2005
New Revision: 345474

URL: http://svn.apache.org/viewcvs?rev=345474&view=rev
Log:
XMLified files describing disabled testcases for layout engine and FO tree

Added:
    xmlgraphics/fop/trunk/test/fotree/disabled-testcases.xml   (with props)
    xmlgraphics/fop/trunk/test/layoutengine/disabled-testcase2filename.xsl   (with props)
    xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.dtd   (with props)
    xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.xml   (with props)
Modified:
    xmlgraphics/fop/trunk/build.xml
    xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java

Modified: xmlgraphics/fop/trunk/build.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/build.xml?rev=345474&r1=345473&r2=345474&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/build.xml (original)
+++ xmlgraphics/fop/trunk/build.xml Fri Nov 18 00:56:06 2005
@@ -188,8 +188,10 @@
 
   <property name="build.property.examples.mime.type" value="application/pdf"/>
 
-  <property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.txt"/>
-  <property name="fotree.disabled" value="test/fotree/disabled-testcases.txt"/>
+  <!--property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.txt"/-->
+  <!--property name="fotree.disabled" value="test/fotree/disabled-testcases.txt"/-->
+  <property name="layoutengine.disabled" value="test/layoutengine/disabled-testcases.xml"/>
+  <property name="fotree.disabled" value="test/fotree/disabled-testcases.xml"/>
 
   <property name="dist.bin.dir" value="${basedir}/dist-bin"/>
   <property name="dist.src.dir" value="${basedir}/dist-src"/>

Added: xmlgraphics/fop/trunk/test/fotree/disabled-testcases.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/fotree/disabled-testcases.xml?rev=345474&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/fotree/disabled-testcases.xml (added)
+++ xmlgraphics/fop/trunk/test/fotree/disabled-testcases.xml Fri Nov 18 00:56:06 2005
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<disabled-testcases>
+  <testcase>
+    <name>demo test failure</name>
+    <file>demo-test-failure.fo</file>
+    <description></description>
+  </testcase>
+</disabled-testcases>

Propchange: xmlgraphics/fop/trunk/test/fotree/disabled-testcases.xml
------------------------------------------------------------------------------
    svn:executable = *

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java?rev=345474&r1=345473&r2=345474&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java Fri Nov 18 00:56:06 2005
@@ -27,6 +27,15 @@
 import java.util.Iterator;
 import java.util.List;
 
+import javax.xml.transform.Result;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.sax.SAXResult;
+import javax.xml.transform.stream.StreamSource;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.filefilter.AndFileFilter;
 import org.apache.commons.io.filefilter.IOFileFilter;
@@ -37,6 +46,10 @@
 import org.apache.commons.io.filefilter.TrueFileFilter;
 import org.apache.fop.DebugHelper;
 
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
@@ -61,11 +74,64 @@
         return (String[])lines.toArray(new String[lines.size()]);
     }
     
+    public static String[] readDisabledTestcases(File f) throws IOException {
+        List lines = new java.util.ArrayList();
+        Source stylesheet = new StreamSource(new File("test/layoutengine/disabled-testcase2filename.xsl"));
+        Source source = new StreamSource(f);
+        Result result = new SAXResult(new FilenameHandler(lines));
+        try {
+            Transformer transformer = TransformerFactory.newInstance().newTransformer(stylesheet);        
+            transformer.transform(source, result);
+        }
+        catch( TransformerConfigurationException tce ) {
+            throw new RuntimeException(tce);
+        }
+        catch( TransformerException te ) {
+            throw new RuntimeException(te);
+        }
+        return (String[])lines.toArray(new String[lines.size()]);
+    }
+    
+    private static class FilenameHandler extends DefaultHandler {
+        private StringBuffer buffer = new StringBuffer(128);
+        private boolean readingFilename =false;
+        private List filenames;
+
+        public FilenameHandler(List filenames) {
+            this.filenames = filenames;
+        }
+
+        public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+            if (qName!=null && qName.equals("file")) {
+                buffer.setLength(0);
+                readingFilename = true;
+            } else {
+                throw new RuntimeException("Unexpected element while reading disabled testcase file names: "+qName);
+            }
+        }
+
+        public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
+            if (qName!=null && qName.equals("file")) {
+                readingFilename = false;
+                filenames.add(buffer.toString());
+            } else {
+                throw new RuntimeException("Unexpected element while reading disabled testcase file names: "+qName);
+            }
+        }
+
+        public void characters(char[] ch, int start, int length) throws SAXException {
+            if (readingFilename) {
+                buffer.append(ch,start,length);
+            }
+        }
+    }
+    
     public static IOFileFilter decorateWithDisabledList(IOFileFilter filter) throws IOException {
         String disabled = System.getProperty("fop.layoutengine.disabled");
         if (disabled != null && disabled.length() > 0) {
             filter = new AndFileFilter(new NotFileFilter(
-                    new NameFileFilter(readLinesFromFile(new File(disabled)))),
+//                           new NameFileFilter(readLinesFromFile(new File(disabled)))),
+                           new NameFileFilter(readDisabledTestcases(new File(disabled)))),
                     filter);
         }
         return filter;

Added: xmlgraphics/fop/trunk/test/layoutengine/disabled-testcase2filename.xsl
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/disabled-testcase2filename.xsl?rev=345474&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/disabled-testcase2filename.xsl (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/disabled-testcase2filename.xsl Fri Nov 18 00:56:06 2005
@@ -0,0 +1,25 @@
+<?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: testcase2checks.xsl 198226 2005-01-05 21:14:22Z jeremias $ -->
+<!-- This stylesheet extracts the checks from the testcase so the list of checks can be built in Java code. -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
+
+  <xsl:template match="/">
+    <xsl:copy-of select="disabled-testcases/testcase/file"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Propchange: xmlgraphics/fop/trunk/test/layoutengine/disabled-testcase2filename.xsl
------------------------------------------------------------------------------
    svn:executable = *

Added: xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.dtd
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.dtd?rev=345474&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.dtd (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.dtd Fri Nov 18 00:56:06 2005
@@ -0,0 +1,7 @@
+<!ELEMENT disabled-testcases (testcase)*>
+<!ELEMENT testcase (name?,file,description?,reference*)>
+<!ATTLIST testcase id ID>
+<!ELEMENT name #PCDATA>
+<!ELEMENT file #PCDATA>
+<!ELEMENT description #PCDATA>
+<!ELEMENT reference #PCDATA>
\ No newline at end of file

Propchange: xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.dtd
------------------------------------------------------------------------------
    svn:executable = *

Added: xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.xml?rev=345474&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.xml (added)
+++ xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.xml Fri Nov 18 00:56:06 2005
@@ -0,0 +1,237 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<disabled-testcases>
+  <testcase>
+    <name>block-container reference-orientation bug36391</name>
+    <file>block-container_reference-orientation_bug36391.xml</file>
+    <description></description>
+    <reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=36391</reference>
+  </testcase>
+  <testcase>
+    <name>block-container space-before space-after_3</name>
+    <file>block-container_space-before_space-after_3.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block font-stretch</name>
+    <file>block_font-stretch.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block linefeed-treatment</name>
+    <file>block_linefeed-treatment.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block padding 2</name>
+    <file>block_padding_2.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block space-before space-after 8</name>
+    <file>block_space-before_space-after_8.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block white-space-collapse 2</name>
+    <file>block_white-space-collapse_2.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block white-space-treatment 1</name>
+    <file>block_white-space-treatment_1.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block white-space-treatment 2</name>
+    <file>block_white-space-treatment_2.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block word-spacing</name>
+    <file>block_word-spacing.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>block word-spacing text-align justify</name>
+    <file>block_word-spacing_text-align_justify.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>external-graphic oversized</name>
+    <file>external-graphic_oversized.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>external-graphic src uri</name>
+    <file>external-graphic_src_uri.xml</file>
+    <description>Doesn't work behind a proxy requiring authorization.</description>
+  </testcase>
+  <testcase>
+    <name>footnote space-resolution</name>
+    <file>footnote_space-resolution.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>inline block keep-together</name>
+    <file>inline-block_keep-together.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>inline block nested 3</name>
+    <file>inline_block_nested_3.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>inline-container block nested</name>
+    <file>inline-container_block_nested.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>inline-container border padding</name>
+    <file>inline-container_border_padding.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>inline letter-spacing</name>
+    <file>inline_letter-spacing.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>inline word-spacing</name>
+    <file>inline_word-spacing.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>inline word-spacing text-align justify</name>
+    <file>inline_word-spacing_text-align_justify.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>leader alignment</name>
+    <file>leader-alignment.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>leader leader-pattern use-content_bug</name>
+    <file>leader_leader-pattern_use-content_bug.xml</file>
+    <description></description>
+    <reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=</reference>
+  </testcase>
+  <testcase>
+    <name>list-block keep-with-previous</name>
+    <file>list-block_keep-with-previous.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>list-item block keep-with-previous</name>
+    <file>list-item_block_keep-with-previous.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>marker bug</name>
+    <file>marker_bug.xml</file>
+    <description></description>
+    <reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=</reference>
+  </testcase>
+  <testcase>
+    <name>page-breaking 4</name>
+    <file>page-breaking_4.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>page-breaking 6</name>
+    <file>page-breaking_6.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>page-height indefinite simple</name>
+    <file>page-height_indefinite_simple.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>page-number-citation background-image</name>
+    <file>page-number-citation_background-image.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>page-number-citation complex 1</name>
+    <file>page-number-citation_complex_1.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>page-number-citation complex 2</name>
+    <file>page-number-citation_complex_2.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>page-number initial-page-number 2</name>
+    <file>page-number_initial-page-number_2.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>region-body column-count footnote</name>
+    <file>region-body_column-count_footnote.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>region-body column-count bug36356</name>
+    <file>region-body_column-count_bug36356.xml</file>
+    <description></description>
+    <reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=36356</reference>
+  </testcase>
+  <testcase>
+    <name>table-body background-image</name>
+    <file>table-body_background-image.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table border-collapse collapse 1</name>
+    <file>table_border-collapse_collapse_1.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table border-collapse collapse 2</name>
+    <file>table_border-collapse_collapse_2.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table border padding</name>
+    <file>table_border_padding.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table-cell block keep-with-previous</name>
+    <file>table-cell_block_keep-with-previous.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table-cell_border padding_conditionality</name>
+    <file>table-cell_border_padding_conditionality.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table-column first-row-width</name>
+    <file>table-column_first-row-width.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table-header background-image</name>
+    <file>table-header_background-image.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table-row keep-with-previous</name>
+    <file>table-row_keep-with-previous.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table table-layout fixed 2</name>
+    <file>table_table-layout_fixed_2.xml</file>
+    <description></description>
+  </testcase>
+  <testcase>
+    <name>table border-width conditionality</name>
+    <file>table_border-width_conditionality.xml</file>
+    <description></description>
+  </testcase>
+</disabled-testcases>
\ No newline at end of file

Propchange: xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.xml
------------------------------------------------------------------------------
    svn:executable = *



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Re: svn commit: r345474 - in /xmlgraphics/fop/trunk: ./ test/fotree/ test/java/org/apache/fop/layoutengine/ test/layoutengine/

Posted by Manuel Mall <mm...@arcus.com.au>.
On Fri, 18 Nov 2005 07:04 pm, Christian Geisert wrote:
> Manuel Mall schrieb:
> > Ooops, that wasn't very efficient as I did more or less the same
> > thing.
>
> Yes, that was unfortunate. I was really wondering seeing Jörg as
> committer after you announced it on the mailing list.
>
> > Oh well you got in first.
> >
> > Here is my disabled-testcases.xml - may be you can merge the
> > comments into yours.
> >
> > I'll leave the integration of the new XML into the web site to you
> > as well then.
>
> Do we need this for the release?

IMO not really - the main driver for converting the disabled-testcases 
to XML was the idea to be able to automatically generate and maintain a 
"Known Issues" page for the web site and also a list for inclusion into 
the release notes. For 0.90alpha1 Jeremias has done that manually in 
the README file. If we can get the web page generation into the release 
that would be a 'nice to have' but is no showstopper for me.

Manuel

Re: svn commit: r345474 - in /xmlgraphics/fop/trunk: ./ test/fotree/ test/java/org/apache/fop/layoutengine/ test/layoutengine/

Posted by Christian Geisert <ch...@isu-gmbh.de>.
Manuel Mall schrieb:
> Ooops, that wasn't very efficient as I did more or less the same thing. 

Yes, that was unfortunate. I was really wondering seeing Jörg as
committer after you announced it on the mailing list.

> Oh well you got in first.
> 
> Here is my disabled-testcases.xml - may be you can merge the comments 
> into yours.
> 
> I'll leave the integration of the new XML into the web site to you as 
> well then.

Do we need this for the release?
-- 
Christian

Re: svn commit: r345474 - in /xmlgraphics/fop/trunk: ./ test/fotree/ test/java/org/apache/fop/layoutengine/ test/layoutengine/

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Manuel Mall wrote:
> Ooops, that wasn't very efficient as I did more or less the same thing. 

Oops, sorry. After several weeks of inactivity I thought
I could polish up the old sketch and commit. There's still
enough work to do though, see the separate post.

J.Pietschmann


Re: svn commit: r345474 - in /xmlgraphics/fop/trunk: ./ test/fotree/ test/java/org/apache/fop/layoutengine/ test/layoutengine/

Posted by Manuel Mall <mm...@arcus.com.au>.
Ooops, that wasn't very efficient as I did more or less the same thing. 

Oh well you got in first.

Here is my disabled-testcases.xml - may be you can merge the comments 
into yours.

I'll leave the integration of the new XML into the web site to you as 
well then.

Cheers

Manuel