You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by wg...@apache.org on 2007/11/19 17:04:17 UTC
svn commit: r596347 -
/velocity/texen/trunk/src/test/org/apache/texen/ExtendedTexenTestCase.java
Author: wglass
Date: Mon Nov 19 08:04:16 2007
New Revision: 596347
URL: http://svn.apache.org/viewvc?rev=596347&view=rev
Log:
temporary error printing code to help debug gump problem.
Modified:
velocity/texen/trunk/src/test/org/apache/texen/ExtendedTexenTestCase.java
Modified: velocity/texen/trunk/src/test/org/apache/texen/ExtendedTexenTestCase.java
URL: http://svn.apache.org/viewvc/velocity/texen/trunk/src/test/org/apache/texen/ExtendedTexenTestCase.java?rev=596347&r1=596346&r2=596347&view=diff
==============================================================================
--- velocity/texen/trunk/src/test/org/apache/texen/ExtendedTexenTestCase.java (original)
+++ velocity/texen/trunk/src/test/org/apache/texen/ExtendedTexenTestCase.java Mon Nov 19 08:04:16 2007
@@ -92,39 +92,53 @@
public void testExtendedTexen() throws Exception
{
- File compareDir = new File (testDir, "texen/compare");
- File resultsDir = new File(System.getProperty(RESULTS_DIR_KEY, "bin/test"), "texen-generator");
-
- TestUtil.assureResultsDirectoryExists(resultsDir);
-
- Texen texen = new Texen();
-
- ExtendedProperties properties = new ExtendedProperties();
-
- TestUtil.loadProperties(new File(testDir, "texen/service.props"), properties);
- TestUtil.loadProperties(new File(testDir, "texen/additional.props"), properties);
-
- texen.setControlTemplate("Control.vm");
- texen.setOutputDirectory(resultsDir);
- texen.setTemplatePath(new File(testDir, "texen/templates").getCanonicalPath());
- texen.setOutputFileName("report");
- texen.setOutputEncoding("ISO-8859-1");
- texen.setInputEncoding("ISO-8859-1");
- texen.setUseClasspath(false);
-
- texen.addContributors(Collections.singleton(new ExtendedPropertiesContributor(properties, new TexenFileResolver() {
- public File resolveFile(final String fileName) {
- return new File(fileName);
+ try
+ {
+
+ File compareDir = new File (testDir, "texen/compare");
+ File resultsDir = new File(System.getProperty(RESULTS_DIR_KEY, "bin/test"), "texen-generator");
+
+ TestUtil.assureResultsDirectoryExists(resultsDir);
+
+ Texen texen = new Texen();
+
+ ExtendedProperties properties = new ExtendedProperties();
+
+ TestUtil.loadProperties(new File(testDir, "texen/service.props"), properties);
+ TestUtil.loadProperties(new File(testDir, "texen/additional.props"), properties);
+
+ texen.setControlTemplate("Control.vm");
+ texen.setOutputDirectory(resultsDir);
+ texen.setTemplatePath(new File(testDir, "texen/templates").getCanonicalPath());
+ texen.setOutputFileName("report");
+ texen.setOutputEncoding("ISO-8859-1");
+ texen.setInputEncoding("ISO-8859-1");
+ texen.setUseClasspath(false);
+
+ texen.addContributors(Collections.singleton(new ExtendedPropertiesContributor(properties, new TexenFileResolver() {
+ public File resolveFile(final String fileName) {
+ return new File(fileName);
+ }
+ })));
+
+ texen.setUseResourceLoaderCache(false);
+ texen.setLog(new Log());
+ texen.execute();
+
+ if (!compareTexenResults(compareDir, resultsDir))
+ {
+ fail("Texen results are incorrect.");
}
- })));
-
- texen.setUseResourceLoaderCache(false);
- texen.setLog(new Log());
- texen.execute();
-
- if (!compareTexenResults(compareDir, resultsDir))
+ }
+ catch (Error e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
+ catch (Exception e)
{
- fail("Texen results are incorrect.");
+ e.printStackTrace();
+ throw e;
}
}