git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@691627 13f79535-47bb-0310-9956-ffa450edef68master
@@ -187,6 +187,10 @@ Fixed bugs: | |||||
<subant> might set the wrong basedir on the called projects. | <subant> might set the wrong basedir on the called projects. | ||||
Bugzilla Report 30569. | Bugzilla Report 30569. | ||||
* If the message of the failed assertion of a forked JUnit test | |||||
contained line feeds some excess output ended up in Ant's log. | |||||
Bugzilla Report 45411. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
@@ -495,10 +495,17 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR | |||||
} | } | ||||
private void logTestListenerEvent(String msg) { | private void logTestListenerEvent(String msg) { | ||||
PrintStream out = savedOut != null ? savedOut : System.out; | |||||
if (logTestListenerEvents) { | if (logTestListenerEvents) { | ||||
PrintStream out = savedOut != null ? savedOut : System.out; | |||||
out.flush(); | out.flush(); | ||||
out.println(JUnitTask.TESTLISTENER_PREFIX + msg); | |||||
if (msg == null) { | |||||
msg = "null"; | |||||
} | |||||
StringTokenizer msgLines = new StringTokenizer(msg, "\r\n", false); | |||||
while (msgLines.hasMoreTokens()) { | |||||
out.println(JUnitTask.TESTLISTENER_PREFIX | |||||
+ msgLines.nextToken()); | |||||
} | |||||
out.flush(); | out.flush(); | ||||
} | } | ||||
} | } | ||||
@@ -227,7 +227,7 @@ public class JUnitTaskTest extends BuildFileTest { | |||||
} | } | ||||
// Bugzilla Issue 45411 | // Bugzilla Issue 45411 | ||||
public void XtestMultilineAssertsFork() { | |||||
public void testMultilineAssertsFork() { | |||||
expectLogNotContaining("testMultilineAssertsFork", "messed up)"); | expectLogNotContaining("testMultilineAssertsFork", "messed up)"); | ||||
assertLogNotContaining("crashed)"); | assertLogNotContaining("crashed)"); | ||||
} | } | ||||