ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r432866 - in /ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit: BaseAntUnitListener.java PlainAntUnitListener.java
Date Sat, 19 Aug 2006 19:34:27 GMT
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


Mime
View raw message