ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r1199931 - in /ant/core/trunk: ./ src/etc/ src/etc/testcases/taskdefs/optional/junitreport/ src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/
Date Wed, 09 Nov 2011 19:42:00 GMT
Author: jglick
Date: Wed Nov  9 19:41:59 2011
New Revision: 1199931

URL: http://svn.apache.org/viewvc?rev=1199931&view=rev
Log:
#51049: <junitreport> mishandled ${line.separator}.

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/etc/junit-frames-xalan1.xsl
    ant/core/trunk/src/etc/junit-frames.xsl
    ant/core/trunk/src/etc/junit-noframes.xsl
    ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport/TEST-sampleproject.coins.CoinTest.xml
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=1199931&r1=1199930&r2=1199931&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Nov  9 19:41:59 2011
@@ -13,6 +13,9 @@ Changes that could break older environme
 Fixed bugs:
 -----------
 
+ * <junitreport> mishandled ${line.separator}.
+   Bugzilla Report 51049.
+
  * <junitreport> did not work in embedded environments on JDK 7.
    Bugzilla Report 51668.
 

Modified: ant/core/trunk/src/etc/junit-frames-xalan1.xsl
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/junit-frames-xalan1.xsl?rev=1199931&r1=1199930&r2=1199931&view=diff
==============================================================================
--- ant/core/trunk/src/etc/junit-frames-xalan1.xsl (original)
+++ ant/core/trunk/src/etc/junit-frames-xalan1.xsl Wed Nov  9 19:41:59 2011
@@ -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>
 
 

Modified: ant/core/trunk/src/etc/junit-frames.xsl
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/junit-frames.xsl?rev=1199931&r1=1199930&r2=1199931&view=diff
==============================================================================
--- ant/core/trunk/src/etc/junit-frames.xsl (original)
+++ ant/core/trunk/src/etc/junit-frames.xsl Wed Nov  9 19:41:59 2011
@@ -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>
 
 

Modified: ant/core/trunk/src/etc/junit-noframes.xsl
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/junit-noframes.xsl?rev=1199931&r1=1199930&r2=1199931&view=diff
==============================================================================
--- ant/core/trunk/src/etc/junit-noframes.xsl (original)
+++ ant/core/trunk/src/etc/junit-noframes.xsl Wed Nov  9 19:41:59 2011
@@ -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>
 
 

Modified: ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport/TEST-sampleproject.coins.CoinTest.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport/TEST-sampleproject.coins.CoinTest.xml?rev=1199931&r1=1199930&r2=1199931&view=diff
==============================================================================
--- ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport/TEST-sampleproject.coins.CoinTest.xml
(original)
+++ ant/core/trunk/src/etc/testcases/taskdefs/optional/junitreport/TEST-sampleproject.coins.CoinTest.xml
Wed Nov  9 19:41:59 2011
@@ -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>

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java?rev=1199931&r1=1199930&r2=1199931&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
(original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitReportTest.java
Wed Nov  9 19:41:59 2011
@@ -104,6 +104,9 @@ public class JUnitReportTest extends Bui
             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);
         }



Mime
View raw message