ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r815680 - /ant/core/trunk/src/tests/antunit/taskdefs/java-test.xml
Date Wed, 16 Sep 2009 09:16:05 GMT
Author: bodewig
Date: Wed Sep 16 09:16:03 2009
New Revision: 815680

URL: http://svn.apache.org/viewvc?rev=815680&view=rev
Log:
Passing tests for PR 47844

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/java-test.xml

Modified: ant/core/trunk/src/tests/antunit/taskdefs/java-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/java-test.xml?rev=815680&r1=815679&r2=815680&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/java-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/java-test.xml Wed Sep 16 09:16:03 2009
@@ -18,8 +18,7 @@
 <project default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
   <import file="../antunit-base.xml" />
 
-  <target name="testOutputProperty"
-          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47602">
+  <target name="-setUpWriterClass">
     <mkdir dir="${input}"/>
     <echo file="${input}/A.java"><![CDATA[
 public class A {
@@ -30,6 +29,11 @@
 }]]></echo>
     <mkdir dir="${output}"/>
     <javac srcdir="${input}" destdir="${output}"/>
+  </target>
+
+  <target name="testOutputProperty"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47602"
+          depends="-setUpWriterClass">
     <java fork="false" classname="A" outputproperty="out"
           errorproperty="err">
       <classpath location="${output}"/>
@@ -37,5 +41,35 @@
     <au:assertPropertyEquals name="out" value="to System.out"/>
     <au:assertPropertyEquals name="err" value="to System.err"/>
   </target>
+
+  <target name="testLogErrorNoInput"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47844"
+          depends="-setUpWriterClass">
+    <property name="stdout" location="${output}/standard.txt"/>
+    <java fork="false" classname="A" output="${stdout}" logError="true">
+      <classpath location="${output}"/>
+    </java>
+    <au:assertResourceContains resource="${stdout}"
+                               value="to System.out"/>
+    <au:assertResourceDoesntContain resource="${stdout}"
+                                    value="to System.err"/>
+    <au:assertLogContains text="to System.err"/>
+  </target>
+
+  <target name="testLogErrorWithInput"
+          description="https://issues.apache.org/bugzilla/show_bug.cgi?id=47844"
+          depends="-setUpWriterClass">
+    <property name="stdout" location="${output}/standard.txt"/>
+    <java fork="false" classname="A" output="${stdout}"
+          logError="true" inputstring="">
+      <classpath location="${output}"/>
+    </java>
+    <au:assertResourceContains resource="${stdout}"
+                               value="to System.out"/>
+    <au:assertResourceDoesntContain resource="${stdout}"
+                                    value="to System.err"/>
+    <au:assertLogContains text="to System.err"/>
+  </target>
+
 </project>
 



Mime
View raw message