ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1154551 - in /ant/core/trunk/src: main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml
Date Sat, 06 Aug 2011 17:11:53 GMT
Author: bodewig
Date: Sat Aug  6 17:11:53 2011
New Revision: 1154551

URL: http://svn.apache.org/viewvc?rev=1154551&view=rev
Log:
never filter out the first line of the exception stack trace in junit so the failure message
is preserved

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
    ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java?rev=1154551&r1=1154550&r2=1154551&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
Sat Aug  6 17:11:53 2011
@@ -1018,11 +1018,13 @@ public class JUnitTestRunner implements 
 
         String line;
         try {
+            boolean firstLine = true;
             while ((line = br.readLine()) != null) {
-                if (!filterLine(line)) {
+                if (firstLine || !filterLine(line)) {
                     pw.write(line);
                     pw.newLine();
                 }
+                firstLine = false;
             }
         } catch (Exception e) {
             return stack; // return the stack unfiltered

Modified: ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml?rev=1154551&r1=1154550&r2=1154551&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml Sat Aug
 6 17:11:53 2011
@@ -87,7 +87,7 @@ public class A extends TestCase {
         value="AssertionFailedError: &&"/>
   </target>
 
-  <target name="XtestMessageWithTheWordMore">
+  <target name="testMessageWithTheWordMore">
     <mkdir dir="${input}/org/example"/>
     <echo file="${input}/org/example/A.java"><![CDATA[
 package org.example;



Mime
View raw message