Created attachment 31569 [details] Patch file for LogCapturer.java The logcontent task outputs the log on one single line. Using the following in the AntUnit test: <project> ... <target name="tearDown"> <echo>This line has no EOL character appended...</echo> <echo>So this is on the same line in the log file</echo> <!-- Write to logfile --> <concat destfile="${logfile}" fixlastline="yes"> <au:logcontent/> </concat> </target> </project> This can be easily fixed in: org.apache.ant.antunit.LogCapturer There is a SVN patch attached that adds a LINE_SEPARATOR to the end of each log entry in the LogCapturer.messageLogged method.
changes similar to your patch have been committed as svn revision 1591972 I'd like to wait for the Gump run to determine whether an option to insert line breaks is needed.
One test inside Ant's own testsuite fails, this is because it tests the order of two adjacent log messages - something you cannot do with separate assertLogContains assertions. [1] I'd add an attribute to assertLogContains and the logcontent resource - mergeLines with default true? - and modify LogCapturer to provide logs with and without merged lines. [1] testRedirector14 in src/tests/antunit/taskdefs/exec/apply-test.xml
added mergeLines in several places and retained backwards compatibility.