ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r1095768 - in /ant/core/trunk/src: etc/testcases/taskdefs/java.xml tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
Date Thu, 21 Apr 2011 16:18:32 GMT
Author: antoine
Date: Thu Apr 21 16:18:32 2011
New Revision: 1095768

URL: http://svn.apache.org/viewvc?rev=1095768&view=rev
Log:
tweaking tests affecting by having made flush a no-op in fixing bug 50507

Modified:
    ant/core/trunk/src/etc/testcases/taskdefs/java.xml
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java

Modified: ant/core/trunk/src/etc/testcases/taskdefs/java.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/java.xml?rev=1095768&r1=1095767&r2=1095768&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/java.xml (original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/java.xml Thu Apr 21 16:18:32 2011
@@ -208,11 +208,11 @@
         <loadfile property="redirect.out.contents" srcfile="${outfile}" />
 
         <condition property="r1file">
-            <equals arg1="${redirect.out.contents}" arg2="foo" />
+            <equals arg1="${redirect.out.contents}" arg2="foo${line.separator}" />
         </condition>
 
         <fail unless="r1file">${outfile}:
-&quot;${redirect.out.contents}&quot; expected &quot;foo&quot;</fail>
+&quot;${redirect.out.contents}&quot; expected &quot;foo&#010;&quot;</fail>
 
         <condition property="r1prop">
             <equals arg1="${redirect.err}" arg2="" />
@@ -248,11 +248,11 @@ redirect.err=&quot;${redirect.err}&quot;
         <loadfile property="redirect.out.contents2" srcfile="${outfile}" />
 
         <condition property="r2file">
-            <equals arg1="${redirect.out.contents2}" arg2="foobar" />
+            <equals arg1="${redirect.out.contents2}" arg2="foo${line.separator}bar${line.separator}"
/>
         </condition>
 
         <fail unless="r2file">${outfile}:
-&quot;${redirect.out.contents2}&quot; expected &quot;foobar&quot;</fail>
+&quot;${redirect.out.contents2}&quot; expected &quot;foo&#010;bar&#010;&quot;</fail>
 
         <condition property="r2prop">
             <!-- property should not change -->

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java?rev=1095768&r1=1095767&r2=1095768&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
(original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
Thu Apr 21 16:18:32 2011
@@ -84,13 +84,13 @@ public class LineOrientedOutputStreamTes
     public void testFlushArray() throws IOException {
         writeByteArray();
         stream.flush();
-        stream.assertInvoked();
+        stream.assertNotInvoked();
     }
 
     public void testFlushSingleBytes() throws IOException {
         writeSingleBytes();
         stream.flush();
-        stream.assertInvoked();
+        stream.assertNotInvoked();
     }
 
     public void testCloseArray() throws IOException {
@@ -133,5 +133,8 @@ public class LineOrientedOutputStreamTes
         private void assertInvoked() {
             assertTrue("At least one line", invoked);
         }
+        private void assertNotInvoked() {
+            assertTrue("No output", invoked==false);
+        }
     }
 }// LineOrientedOutputStreamTest



Mime
View raw message