logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1483424 - /logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java
Date Thu, 16 May 2013 15:59:02 GMT
Author: ggregory
Date: Thu May 16 15:59:02 2013
New Revision: 1483424

URL: http://svn.apache.org/r1483424
Log:
Test default charset.

Modified:
    logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java

Modified: logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java?rev=1483424&r1=1483423&r2=1483424&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/test/java/org/apache/logging/log4j/core/layout/XMLLayoutTest.java
Thu May 16 15:59:02 2013
@@ -24,12 +24,14 @@ import org.apache.logging.log4j.core.Log
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.test.appender.ListAppender;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
+import org.apache.logging.log4j.core.helpers.Charsets;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
 import java.util.List;
 
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 /**
@@ -56,6 +58,11 @@ public class XMLLayoutTest {
 
     Logger root = ctx.getLogger("");
 
+    @Test
+    public void testDefaultCharset() {
+        final XMLLayout layout = XMLLayout.createLayout(null, null, null, null);
+        assertEquals(Charsets.UTF_8, layout.getCharset());
+    }
 
     /**
      * Test case for MDC conversion pattern.



Mime
View raw message