Browse Source

#51049: <junitreport> mishandled ${line.separator}.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1199931 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 13 years ago
parent
commit
61ade34e43
6 changed files with 16 additions and 5 deletions
  1. +3
    -0
      WHATSNEW
  2. +3
    -1
      src/etc/junit-frames-xalan1.xsl
  3. +3
    -1
      src/etc/junit-frames.xsl
  4. +3
    -1
      src/etc/junit-noframes.xsl
  5. +1
    -2
      src/etc/testcases/taskdefs/optional/junitreport/TEST-sampleproject.coins.CoinTest.xml
  6. +3
    -0
      src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java

+ 3
- 0
WHATSNEW View File

@@ -13,6 +13,9 @@ Changes that could break older environments:
Fixed bugs:
-----------

* <junitreport> mishandled ${line.separator}.
Bugzilla Report 51049.

* <junitreport> did not work in embedded environments on JDK 7.
Bugzilla Report 51668.



+ 3
- 1
src/etc/junit-frames-xalan1.xsl View File

@@ -707,7 +707,9 @@ h6 {
<xsl:param name="string"/>
<xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
<xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
<xsl:value-of select="$tmp2"/>
<xsl:param name="tmp3" select="stringutils:replace(string($tmp2),&quot;&#10;&quot;,'\n')"/>
<xsl:param name="tmp4" select="stringutils:replace(string($tmp3),&quot;&#13;&quot;,'\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>




+ 3
- 1
src/etc/junit-frames.xsl View File

@@ -866,7 +866,9 @@ h6 {
<xsl:param name="string"/>
<xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
<xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
<xsl:value-of select="$tmp2"/>
<xsl:param name="tmp3" select="stringutils:replace(string($tmp2),&quot;&#10;&quot;,'\n')"/>
<xsl:param name="tmp4" select="stringutils:replace(string($tmp3),&quot;&#13;&quot;,'\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>




+ 3
- 1
src/etc/junit-noframes.xsl View File

@@ -441,7 +441,9 @@
<xsl:param name="string"/>
<xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
<xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
<xsl:value-of select="$tmp2"/>
<xsl:param name="tmp3" select="stringutils:replace(string($tmp2),&quot;&#10;&quot;,'\n')"/>
<xsl:param name="tmp4" select="stringutils:replace(string($tmp3),&quot;&#13;&quot;,'\r')"/>
<xsl:value-of select="$tmp4"/>
</xsl:template>




+ 1
- 2
src/etc/testcases/taskdefs/optional/junitreport/TEST-sampleproject.coins.CoinTest.xml View File

@@ -36,8 +36,7 @@
<property name="basedir" value="/home/jkf/programming/gretant_sourceforge/sampleproject"></property>
<property name="os.arch" value="i386"></property>
<property name="java.io.tmpdir" value="/tmp"></property>
<property name="line.separator" value="
"></property>
<property name="line.separator" value="&#xd;&#xa;"></property>
<property name="java.vm.specification.vendor" value="Sun Microsystems Inc."></property>
<property name="java.awt.fonts" value=""></property>
<property name="os.name" value="Linux"></property>


+ 3
- 0
src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java View File

@@ -104,6 +104,9 @@ public class JUnitReportTest extends BuildFileTest {
assertTrue("output must contain <br>:\n" + report,
report.indexOf("junit.framework.AssertionFailedError: DOEG<br>")
> -1);
assertTrue("#51049: output must translate line breaks:\n" + report,
report.indexOf("cur['line.separator'] = '\\r\\n';")
> -1);
} finally {
FileUtils.close(r);
}


Loading…
Cancel
Save