You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by an...@apache.org on 2011/04/21 18:18:32 UTC
svn commit: r1095768 - in /ant/core/trunk/src:
etc/testcases/taskdefs/java.xml
tests/junit/org/apache/tools/ant/util/LineOrientedOutputStreamTest.java
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}:
-"${redirect.out.contents}" expected "foo"</fail>
+"${redirect.out.contents}" expected "foo
"</fail>
<condition property="r1prop">
<equals arg1="${redirect.err}" arg2="" />
@@ -248,11 +248,11 @@ redirect.err="${redirect.err}"
<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}:
-"${redirect.out.contents2}" expected "foobar"</fail>
+"${redirect.out.contents2}" expected "foo
bar
"</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