[logback-dev] svn commit: r1796 - logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Mon Sep 8 18:58:38 CEST 2008
Author: ceki
Date: Mon Sep 8 18:58:38 2008
New Revision: 1796
Modified:
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TestConstants.java
Log:
- adjustments for BEA Jrockit
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/PatternLayoutTest.java Mon Sep 8 18:58:38 2008
@@ -24,7 +24,7 @@
import ch.qos.logback.core.Context;
import ch.qos.logback.core.pattern.PatternLayoutBase;
import ch.qos.logback.core.pattern.parser.AbstractPatternLayoutBaseTest;
-
+import static ch.qos.logback.classic.TestConstants.*;
public class PatternLayoutTest extends AbstractPatternLayoutBaseTest {
@@ -64,7 +64,8 @@
pl.start();
String val = pl.doLayout(getEventObject());
// 2006-02-01 22:38:06,212 INFO [main] c.q.l.pattern.ConverterTest - Some message
- String regex = TestConstants.ISO_REGEX+" INFO \\[main] c.q.l.c.pattern.ConverterTest - Some message\\s*";
+ String regex = ISO_REGEX+" INFO "+MAIN_REGEX+" c.q.l.c.pattern.ConverterTest - Some message\\s*";
+
assertTrue(val.matches(regex));
}
@@ -86,8 +87,7 @@
pl.start();
String val = pl.doLayout(getEventObject());
// 2008-03-18 21:55:54,250 [main] c.q.l.c.pattern.ConverterTest - Some message
- String regex = TestConstants.ISO_REGEX+" \\[main] c.q.l.c.p.ConverterTest - Some message\\s*";
- System.out.println(val);
+ String regex = ISO_REGEX+" "+MAIN_REGEX+" c.q.l.c.p.ConverterTest - Some message\\s*";
assertTrue(val.matches(regex));
}
@@ -123,7 +123,7 @@
pl.start();
String val = pl.doLayout(getEventObject());
// 2006-02-01 22:38:06,212 INFO [main] c.q.l.pattern.ConverterTest - Some message
- String regex = TestConstants.ISO_REGEX+" INFO \\[main] c.q.l.c.pattern.ConverterTest - Some message\\s*";
+ String regex = TestConstants.ISO_REGEX+" INFO "+MAIN_REGEX+" c.q.l.c.pattern.ConverterTest - Some message\\s*";
assertTrue(val.matches(regex));
}
Modified: logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TestConstants.java
==============================================================================
--- logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TestConstants.java (original)
+++ logback/trunk/logback-classic/src/test/java/ch/qos/logback/classic/TestConstants.java Mon Sep 8 18:58:38 2008
@@ -12,6 +12,7 @@
public class TestConstants {
final static public String ISO_REGEX = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}";
-
+ final static public String MAIN_REGEX = "\\[[mM]ain(\\sThread)?\\]";
+
final static public String JORAN_ONPUT_PREFIX = "src/test/input/joran";
}
More information about the logback-dev
mailing list