You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2006/08/19 21:34:27 UTC

svn commit: r432866 - in /ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit: BaseAntUnitListener.java PlainAntUnitListener.java

Author: bodewig
Date: Sat Aug 19 12:34:26 2006
New Revision: 432866

URL: http://svn.apache.org/viewvc?rev=432866&view=rev
Log:
need to make extension configurable

Modified:
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/BaseAntUnitListener.java
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/BaseAntUnitListener.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/BaseAntUnitListener.java?rev=432866&r1=432865&r2=432866&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/BaseAntUnitListener.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/BaseAntUnitListener.java Sat Aug 19 12:34:26 2006
@@ -43,8 +43,10 @@
 public abstract class BaseAntUnitListener extends ProjectComponent
     implements AntUnitListener {
 
-    protected BaseAntUnitListener(SendLogTo defaultReportTarget) {
+    protected BaseAntUnitListener(SendLogTo defaultReportTarget,
+                                  String extension) {
         logTo = defaultReportTarget;
+        this.extension = extension;
     }
 
     /**
@@ -58,6 +60,11 @@
     private File toDir;
 
     /**
+     * Extension for report files.
+     */
+    private String extension;
+
+    /**
      * Directory to write reports to.
      */
     protected final File getToDir() {
@@ -137,7 +144,7 @@
             
             String fileName = "TEST-" +
                 buildFile.replace(File.separatorChar, '.').replace(':', '.')
-                + ".txt";
+                + "." + extension;
             File file = toDir == null
                 ? getProject().resolveFile(fileName)
                 : new File(toDir, fileName);

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java?rev=432866&r1=432865&r2=432866&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/PlainAntUnitListener.java Sat Aug 19 12:34:26 2006
@@ -29,7 +29,7 @@
 import org.apache.tools.ant.Project;
 
 /**
- * A test listener for <antunit> modeled aftern the Plain JUnit
+ * A test listener for <antunit> modelled after the Plain JUnit
  * test listener that is part of Ant.
  */
 public class PlainAntUnitListener extends BaseAntUnitListener {
@@ -44,7 +44,7 @@
     private PrintWriter wri;
 
     public PlainAntUnitListener() {
-        super(new BaseAntUnitListener.SendLogTo(SendLogTo.ANT_LOG));
+        super(new BaseAntUnitListener.SendLogTo(SendLogTo.ANT_LOG), "txt");
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org