You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2020/08/14 12:33:05 UTC

[maven-shared-utils] branch i952 created (now 9419d4c)

This is an automated email from the ASF dual-hosted git repository.

elharo pushed a change to branch i952
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git.


      at 9419d4c  make test platform independent

This branch includes the following new commits:

     new 9419d4c  make test platform independent

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-shared-utils] 01/01: make test platform independent

Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch i952
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git

commit 9419d4cbde94340c404055828af912489b38c139
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Fri Aug 14 08:32:49 2020 -0400

    make test platform independent
---
 .../maven/shared/utils/xml/Xpp3DomBuilderTest.java  | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/test/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilderTest.java b/src/test/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilderTest.java
index a236ede..08c92a8 100644
--- a/src/test/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilderTest.java
+++ b/src/test/java/org/apache/maven/shared/utils/xml/Xpp3DomBuilderTest.java
@@ -19,7 +19,6 @@ package org.apache.maven.shared.utils.xml;
  * under the License.
  */
 
-import org.apache.maven.shared.utils.StringUtils;
 import org.apache.maven.shared.utils.xml.pull.XmlPullParserException;
 
 import org.junit.Test;
@@ -43,9 +42,7 @@ import static org.junit.Assert.fail;
 public class Xpp3DomBuilderTest
 {
 
-    private static final String LS = System.getProperty( "line.separator" );
-
-    private static final String xmlDeclaration = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+    private static final String XML_DECLARATION = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
 
     @Test
     public void selfClosingTag()
@@ -137,9 +134,9 @@ public class Xpp3DomBuilderTest
     {
         StringBuilder domString = new StringBuilder();
         domString.append( "<root>" );
-        domString.append( LS );
+        domString.append( "\n" );
         domString.append( "  <el att=\"&lt;foo&gt;\">bar</el>" );
-        domString.append( LS );
+        domString.append( "\n" );
         domString.append( "</root>" );
 
         return domString.toString();
@@ -161,13 +158,13 @@ public class Xpp3DomBuilderTest
     {
         StringBuilder domString = new StringBuilder();
         domString.append( "<root>" );
-        domString.append( LS );
+        domString.append( "\n" );
         domString.append( "  <a1>\"msg\"</a1>" );
-        domString.append( LS );
+        domString.append( "\n" );
         domString.append( "  <a2>&lt;b&gt;\"msg\"&lt;/b&gt;</a2>" );
-        domString.append( LS );
+        domString.append( "\n" );
         domString.append( "  <a3>&lt;b&gt;\"msg\"&lt;/b&gt;</a3>" );
-        domString.append( LS );
+        domString.append( "\n" );
         domString.append( "</root>" );
         return domString.toString();
     }
@@ -195,12 +192,12 @@ public class Xpp3DomBuilderTest
         buf.append( "  <el4></el4>\n" );
         buf.append( "  <el5></el5>\n" );
         buf.append( "</root>" );
-        return StringUtils.unifyLineSeparators( buf.toString() );
+        return buf.toString();
     }
 
     private static String expectedSelfClosingTag()
     {
-        return StringUtils.unifyLineSeparators( xmlDeclaration + selfClosingTagSource() );
+        return XML_DECLARATION + selfClosingTagSource();
     }
 
 }