[logback-dev] svn commit: r1650 - logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Wed Mar 19 19:58:43 CET 2008
Author: ceki
Date: Wed Mar 19 19:58:42 2008
New Revision: 1650
Modified:
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/SamplePatternLayoutTest.java
Log:
- added a test case for including % as a literal in a conversion pattern
Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/SamplePatternLayoutTest.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/SamplePatternLayoutTest.java (original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/pattern/parser/SamplePatternLayoutTest.java Wed Mar 19 19:58:42 2008
@@ -51,13 +51,17 @@
plb.setPattern("x(%OTT\\)");
plb.start();
String s = plb.doLayout(new Object());
- //System.out.println(s);
- System.out.println(s);
-
- //StatusManager sm = context.getStatusManager();
- //StatusPrinter.print(sm);
assertEquals("x(123)", s);
+ }
+ public void testPercentAsLiteral() {
+ PatternLayoutBase<Object> plb = getPatternLayoutBase();
+ Context context = new ContextBase();
+ plb.setContext(context);
+ plb.setPattern("hello \\% world");
+ plb.start();
+ String s = plb.doLayout(new Object());
+ assertEquals("hello % world", s);
}
More information about the logback-dev
mailing list