ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1154190 - /ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml
Date Fri, 05 Aug 2011 12:42:55 GMT
Author: bodewig
Date: Fri Aug  5 12:42:54 2011
New Revision: 1154190

URL: http://svn.apache.org/viewvc?rev=1154190&view=rev
Log:
JUnit's filtertrace swallows the assert failure message if it contains the word 'more' as
reported on the user list - http://mail-archives.apache.org/mod_mbox/ant-user/201107.mbox/%3CCAPsH_EDFnhkW4Y4r87U2jmN2gKPAyK6ZJX5F-4ohC6tJ9rXi6Q@mail.gmail.com%3E

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/optional/junit/xmlformatter-test.xml

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=1154190&r1=1154189&r2=1154190&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 Fri Aug
 5 12:42:54 2011
@@ -87,4 +87,40 @@ public class A extends TestCase {
         value="AssertionFailedError: &&"/>
   </target>
 
+  <target name="XtestMessageWithTheWordMore">
+    <mkdir dir="${input}/org/example"/>
+    <echo file="${input}/org/example/A.java"><![CDATA[
+package org.example;
+import junit.framework.TestCase;
+public class A extends TestCase {
+    public void testX() {
+        assertTrue("Expected more than one result", 0 > 1);
+    }
+    public void testY() {
+        assertTrue("Expected less than one result", 2 < 1);
+    }
+}
+]]></echo>
+    <mkdir dir="${output}"/>
+    <javac srcdir="${input}" destdir="${output}">
+      <classpath refid="junit"/>
+    </javac>
+    <junit fork="true">
+      <classpath refid="junit"/>
+      <classpath location="${output}"/>
+      <batchtest todir="${output}">
+        <fileset dir="${output}">
+          <include name="**/A.class" />
+        </fileset>
+      </batchtest>
+      <formatter type="xml"/>
+    </junit>
+    <au:assertResourceContains
+        resource="${output}/TEST-org.example.A.xml"
+        value="junit.framework.AssertionFailedError: Expected less than one result"/>
+    <au:assertResourceContains
+        resource="${output}/TEST-org.example.A.xml"
+        value="junit.framework.AssertionFailedError: Expected more than one result"/>
+  </target>
+
 </project>



Mime
View raw message