logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1390561 - /logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/PatternParserTest.java
Date Wed, 26 Sep 2012 15:24:17 GMT
Author: rgoers
Date: Wed Sep 26 15:24:17 2012
New Revision: 1390561

URL: http://svn.apache.org/viewvc?rev=1390561&view=rev
Log:
Fix PatternParserTest on Windows

Modified:
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/PatternParserTest.java

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/PatternParserTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/PatternParserTest.java?rev=1390561&r1=1390560&r2=1390561&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/PatternParserTest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/pattern/PatternParserTest.java
Wed Sep 26 15:24:17 2012
@@ -56,6 +56,7 @@ public class PatternParserTest {
 
     private static String customPattern = "[%d{yyyyMMdd HH:mm:ss,SSS}] %-5p [%-25.25c{1}:%-4L]
- %m%n";
 
+    private static final String LINE_SEP = System.getProperty("line.separator");
 
     private static final String KEY = "Converter";
     private PatternParser parser;
@@ -102,7 +103,7 @@ public class PatternParserTest {
             formatter.format(event, buf);
         }
         String str = buf.toString();
-        String expected = "INFO  [PatternParserTest        :95  ] - Hello, world\n";
+        String expected = "INFO  [PatternParserTest        :96  ] - Hello, world" + LINE_SEP;
         assertTrue("Expected to end with: " + expected + ". Actual: " + str, str.endsWith(expected));
     }
 



Mime
View raw message