You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 09:58:04 UTC

[sling-org-apache-sling-repoinit-parser] 15/22: normalize line endings to ensure tests run on windows as well

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

rombert pushed a commit to annotated tag org.apache.sling.repoinit.parser-1.0.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git

commit a7fbbdd2181fcbb413eacf45648a5f925e01aeec
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Feb 5 23:03:49 2016 +0000

    normalize line endings to ensure tests run on windows as well
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/repoinit/parser@1728773 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/repoinit/parser/test/ParserTest.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/sling/repoinit/parser/test/ParserTest.java b/src/test/java/org/apache/sling/repoinit/parser/test/ParserTest.java
index 8c75643..94c77e2 100644
--- a/src/test/java/org/apache/sling/repoinit/parser/test/ParserTest.java
+++ b/src/test/java/org/apache/sling/repoinit/parser/test/ParserTest.java
@@ -117,7 +117,12 @@ public class ParserTest {
                 o.accept(v);
             }
             sw.flush();
-            assertEquals(expected, sw.toString().trim());
+            String actual = sw.toString().trim();
+            
+            // normalize line endings to ensure tests run on windows as well
+            actual = actual.replaceAll("\r\n", "\n");
+            
+            assertEquals(expected, actual);
         } finally {
             tc.close();
         }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.