You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2010/06/10 18:09:07 UTC
svn commit: r953366 -
/ant/core/trunk/src/tests/junit/org/apache/tools/ant/DefaultLoggerTest.java
Author: bodewig
Date: Thu Jun 10 16:09:07 2010
New Revision: 953366
URL: http://svn.apache.org/viewvc?rev=953366&view=rev
Log:
Test failed on Windows, don't know why I never noticed before
Modified:
ant/core/trunk/src/tests/junit/org/apache/tools/ant/DefaultLoggerTest.java
Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/DefaultLoggerTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/DefaultLoggerTest.java?rev=953366&r1=953365&r2=953366&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/DefaultLoggerTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/DefaultLoggerTest.java Thu Jun 10 16:09:07 2010
@@ -31,24 +31,24 @@ public class DefaultLoggerTest extends T
private static String msg(Throwable error, boolean verbose) {
StringBuffer m = new StringBuffer();
DefaultLogger.throwableMessage(m, error, verbose);
- return m.toString().replace(StringUtils.LINE_SEP.charAt(0), '\n');
+ return m.toString();
}
public void testThrowableMessage() throws Exception { // #43398
BuildException be = new BuildException("oops", new Location("build.xml", 1, 0));
assertEquals(
- "build.xml:1: oops\n",
+ "build.xml:1: oops" + StringUtils.LINE_SEP,
msg(be, false));
be = ProjectHelper.addLocationToBuildException(be, new Location("build.xml", 2, 0));
assertEquals(
- "build.xml:2: The following error occurred while executing this line:\n" +
- "build.xml:1: oops\n",
+ "build.xml:2: The following error occurred while executing this line:" + StringUtils.LINE_SEP +
+ "build.xml:1: oops" + StringUtils.LINE_SEP,
msg(be, false));
be = ProjectHelper.addLocationToBuildException(be, new Location("build.xml", 3, 0));
assertEquals(
- "build.xml:3: The following error occurred while executing this line:\n" +
- "build.xml:2: The following error occurred while executing this line:\n" +
- "build.xml:1: oops\n",
+ "build.xml:3: The following error occurred while executing this line:" + StringUtils.LINE_SEP +
+ "build.xml:2: The following error occurred while executing this line:" + StringUtils.LINE_SEP +
+ "build.xml:1: oops" + StringUtils.LINE_SEP,
msg(be, false));
Exception x = new Exception("problem") {
public void printStackTrace(PrintWriter w) {
@@ -57,19 +57,19 @@ public class DefaultLoggerTest extends T
}
};
assertEquals(
- "problem\n" +
- " at p.C.m\n",
+ "problem" + StringUtils.LINE_SEP +
+ " at p.C.m" + StringUtils.LINE_SEP,
msg(x, false));
be = new BuildException(x, new Location("build.xml", 1, 0));
assertEquals(
- "build.xml:1: problem\n" +
- " at p.C.m\n",
+ "build.xml:1: problem" + StringUtils.LINE_SEP +
+ " at p.C.m" + StringUtils.LINE_SEP,
msg(be, false));
be = ProjectHelper.addLocationToBuildException(be, new Location("build.xml", 2, 0));
assertEquals(
- "build.xml:2: The following error occurred while executing this line:\n" +
- "build.xml:1: problem\n" +
- " at p.C.m\n",
+ "build.xml:2: The following error occurred while executing this line:" + StringUtils.LINE_SEP +
+ "build.xml:1: problem" + StringUtils.LINE_SEP +
+ " at p.C.m" + StringUtils.LINE_SEP,
msg(be, false));
}
Re: svn commit: r953366 - /ant/core/trunk/src/tests/junit/org/apache/tools/ant/DefaultLoggerTest.java
Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-06-10, <bo...@apache.org> wrote:
> Test failed on Windows, don't know why I never noticed before
I never noticed because I never forked the tests and DefaultLoggerTest
(as well as LocatorTest that failed as well) are in the "only run in
forked mode or under Gump" set.
Changing the default of junit.fork is paying off, thanks Jesse.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org