]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
sets base dir for test, using xml path
authorKeiron Liddle <keiron@apache.org>
Wed, 4 Jul 2001 13:55:28 +0000 (13:55 +0000)
committerKeiron Liddle <keiron@apache.org>
Wed, 4 Jul 2001 13:55:28 +0000 (13:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194330 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/tools/TestConverter.java

index fcc402ed734159d870378c2eb989642b1648fe2d..57a9c04e6d6771700315156fd16e6d8b1b2475c2 100644 (file)
@@ -7,6 +7,7 @@
 package org.apache.fop.tools;
 
 import org.apache.fop.apps.*;
+import org.apache.fop.configuration.*;
 
 import java.io.*;
 import java.util.*;
@@ -188,6 +189,13 @@ public class TestConverter {
 
         try {
             File xmlFile = new File(baseDir + "/" + xml);
+
+            try {
+                Configuration.put("baseDir", xmlFile.getParentFile().toURL().toExternalForm());
+            } catch (Exception e) {
+                System.err.println("Error setting base directory");
+            }
+
             InputHandler inputHandler = new XSLTInputHandler(xmlFile,
                                         new File(baseDir + "/" + xsl));
 
@@ -214,6 +222,7 @@ public class TestConverter {
             }
             driver.setOutputStream(
               new FileOutputStream(new File(destdir, outname + (outputPDF ? ".pdf" : ".at.xml"))));
+System.out.println("ddir:" + destdir + " on:" + outname + ".pdf");
             driver.render();
 
             // check difference