From: Keiron Liddle Date: Wed, 4 Jul 2001 13:55:28 +0000 (+0000) Subject: sets base dir for test, using xml path X-Git-Tag: PRE_CODEFORMATTING~49 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb6b3bae25c211cdb50cea45ccbe318e39adb06b;p=xmlgraphics-fop.git sets base dir for test, using xml path git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194330 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/tools/TestConverter.java b/src/org/apache/fop/tools/TestConverter.java index fcc402ed7..57a9c04e6 100644 --- a/src/org/apache/fop/tools/TestConverter.java +++ b/src/org/apache/fop/tools/TestConverter.java @@ -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