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 je...@apache.org on 2007/05/28 16:31:33 UTC

svn commit: r542237 [5/5] - in /xmlgraphics/fop/trunk: ./ lib/ src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/apps/ src/java/org/apache/fop/area/ src/java/org/apache/fop/cli/ src/java/org/apache/fop/fonts/ src/java/org/apache/fop/fonts/...

Added: xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java?view=auto&rev=542237
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java (added)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java Mon May 28 07:31:24 2007
@@ -0,0 +1,42 @@
+/*
+ * 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$ */
+
+package org.apache.fop.config;
+
+/*
+ * this font has a metrics-url that does not exist on filesystem
+ */ 
+public class FontsDirectoryBadTestCase extends BaseDestructiveUserConfigTestCase {
+
+    public FontsDirectoryBadTestCase(String name) {
+        super(name);
+    }
+    
+    /**
+     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
+     */
+    public String getUserConfigFilename() {
+        return "test_fonts_directory_bad.xconf";
+    }
+    
+    /** get test FOP config File */
+    protected String getFontFOFilePath() {
+        return "test/xml/bugtests/font-dir.fo";
+    }
+}

Propchange: xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java?view=auto&rev=542237
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java (added)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java Mon May 28 07:31:24 2007
@@ -0,0 +1,37 @@
+/*
+ * 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$ */
+
+package org.apache.fop.config;
+
+/**
+ * tests font directory on system 
+ */
+public class FontsDirectoryRecursiveTestCase extends BaseConstructiveUserConfigTestCase {
+
+    public FontsDirectoryRecursiveTestCase(String name) {
+        super(name);
+    }
+
+    /**
+     * @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
+     */
+    protected String getUserConfigFilename() {
+        return "test_fonts_directory_recursive.xconf";
+    }    
+}

Propchange: xmlgraphics/fop/trunk/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/config/UserConfigTestSuite.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/config/UserConfigTestSuite.java?view=diff&rev=542237&r1=542236&r2=542237
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/config/UserConfigTestSuite.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/config/UserConfigTestSuite.java Mon May 28 07:31:24 2007
@@ -38,10 +38,12 @@
         suite.addTest(new TestSuite(FontBaseBadTestCase.class));
         suite.addTest(new TestSuite(FontAttributesMissingTestCase.class));
         suite.addTest(new TestSuite(FontTripletAttributeMissingTestCase.class));
-        suite.addTest(new TestSuite(MetricsUrlBadTestCase.class));
-        suite.addTest(new TestSuite(EmbedUrlBadTestCase.class));
-        suite.addTest(new TestSuite(MetricsUrlMalformedTestCase.class));
-        suite.addTest(new TestSuite(EmbedUrlMalformedTestCase.class));
+        suite.addTest(new TestSuite(FontMetricsUrlBadTestCase.class));
+        suite.addTest(new TestSuite(FontEmbedUrlBadTestCase.class));
+        suite.addTest(new TestSuite(FontMetricsUrlMalformedTestCase.class));
+        suite.addTest(new TestSuite(FontEmbedUrlMalformedTestCase.class));
+        suite.addTest(new TestSuite(FontsDirectoryRecursiveTestCase.class));
+        suite.addTest(new TestSuite(FontsAutoDetectTestCase.class));
         //$JUnit-END$
         return suite;
     }

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java?view=diff&rev=542237&r1=542236&r2=542237
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java Mon May 28 07:31:24 2007
@@ -93,7 +93,10 @@
         return result;
     }
 
-    /** get FOP config File */
+    /** 
+     * get FOP config File 
+     * @return user config file to be used for testing 
+     */
     protected File getUserConfigFile() {
         return new File("test/test.xconf");
     }

Modified: xmlgraphics/fop/trunk/test/test.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/test.xconf?view=diff&rev=542237&r1=542236&r2=542237
==============================================================================
--- xmlgraphics/fop/trunk/test/test.xconf (original)
+++ xmlgraphics/fop/trunk/test/test.xconf Mon May 28 07:31:24 2007
@@ -1,5 +1,9 @@
 <?xml version="1.0"?>
 <fop version="1.0">
+
+  <!-- Switch off font caching for the purposes of unit testing -->
+  <use-cache>false</use-cache>
+  
   <renderers>
     <renderer mime="application/pdf">
       <fonts>

Added: xmlgraphics/fop/trunk/test/xml/bugtests/font-dir.fo
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/xml/bugtests/font-dir.fo?view=auto&rev=542237
==============================================================================
--- xmlgraphics/fop/trunk/test/xml/bugtests/font-dir.fo (added)
+++ xmlgraphics/fop/trunk/test/xml/bugtests/font-dir.fo Mon May 28 07:31:24 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+  <fo:layout-master-set>
+      <fo:simple-page-master master-name="simplePM"
+                    page-height="25cm"
+                    page-width="20cm"
+                    margin-top="1cm"
+                    margin-bottom="1cm"
+                    margin-left="1.5cm"
+                    margin-right="1.5cm">
+        <fo:region-body margin-top="3cm" margin-bottom="3cm"/>
+        <fo:region-before extent="2.5cm"/>
+        <fo:region-after extent="2.5cm"/>
+      </fo:simple-page-master>
+  </fo:layout-master-set>
+
+  <fo:page-sequence master-reference="simplePM">
+      <fo:flow flow-name="xsl-region-body">
+      <fo:block font-family="RageItalic" font-size="12pt">
+        This is a simple fo text in Rage italic font.
+      </fo:block>
+    </fo:flow>
+  </fo:page-sequence>
+</fo:root>

Propchange: xmlgraphics/fop/trunk/test/xml/bugtests/font-dir.fo
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: xmlgraphics/fop/trunk/test/xml/bugtests/font-dir.fo
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/test/xml/pdf-encoding/pdf-encoding-test.xconf
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/xml/pdf-encoding/pdf-encoding-test.xconf?view=diff&rev=542237&r1=542236&r2=542237
==============================================================================
--- xmlgraphics/fop/trunk/test/xml/pdf-encoding/pdf-encoding-test.xconf (original)
+++ xmlgraphics/fop/trunk/test/xml/pdf-encoding/pdf-encoding-test.xconf Mon May 28 07:31:24 2007
@@ -23,6 +23,9 @@
 -->
 
 <fop version="1.0">
+  <!-- Switch off font caching for the purposes of unit testing -->
+  <cache-fonts>false</cache-fonts>
+
   <renderers>
     <renderer mime="application/pdf">
       <!-- disable PDF text compression -->



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