logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/tests/src/java/org/apache/joran InterpreterTest.java
Date Mon, 12 Apr 2004 19:05:40 GMT
ceki        2004/04/12 12:05:40

  Modified:    tests/src/java/org/apache/joran InterpreterTest.java
  Log:
  
  Fixed a minor problem related to the number of ErrorItems expected
  in certain tests. This should correct the errors detected by the latest Gump runs.
  
  Revision  Changes    Path
  1.6       +8 -4      logging-log4j/tests/src/java/org/apache/joran/InterpreterTest.java
  
  Index: InterpreterTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/joran/InterpreterTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InterpreterTest.java	3 Apr 2004 15:16:10 -0000	1.5
  +++ InterpreterTest.java	12 Apr 2004 19:05:40 -0000	1.6
  @@ -22,6 +22,7 @@
    */
   package org.apache.joran;
   
  +import joran.implicit.NOPAction;
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  @@ -160,8 +161,10 @@
       logger.debug("Starting testLoop");
   
       RuleStore rs = new SimpleRuleStore();
  -    logger.debug("pattern: " + new Pattern("log4j:configuration/logger"));
  +    
  +    rs.addRule(new Pattern("log4j:configuration"), new NOPAction());
       rs.addRule(new Pattern("log4j:configuration/logger"), new LoggerAction());
  +    rs.addRule(new Pattern("*/appender-ref"), new NOPAction());
       rs.addRule(
         new Pattern("log4j:configuration/logger/level"), new LevelAction());
       rs.addRule(
  @@ -205,6 +208,7 @@
     public void testParsing2() throws Exception {
       logger.debug("Starting testLoop2");
       RuleStore rs = new SimpleRuleStore();
  +    rs.addRule(new Pattern("log4j:configuration"), new NOPAction());
       rs.addRule(new Pattern("log4j:configuration/logger"), new LoggerAction());
       rs.addRule(
         new Pattern("log4j:configuration/logger/level"), new LevelAction());
  @@ -246,7 +250,7 @@
       assertEquals("%-5p %c{2} - %m%n", plBack.getConversionPattern());
       
       a1Back = (FileAppender) rootLogger.getAppender("A1");  
  -    
  +
       assertEquals(3, ec.getErrorList().size());
       ErrorItem e0 = (ErrorItem) ec.getErrorList().get(0);
       if(!e0.getMessage().startsWith("No 'name' attribute in element")) {
  @@ -373,10 +377,10 @@
     
     public static Test Xsuite() {
       TestSuite suite = new TestSuite();
  -     suite.addTest(new InterpreterTest("testIllFormedXML"));
  +     //suite.addTest(new InterpreterTest("testIllFormedXML"));
       //suite.addTest(new InterpreterTest("testBasicLoop"));
       //suite.addTest(new InterpreterTest("testParsing1"));
  -    //suite.addTest(new InterpreterTest("testParsing2"));
  +    suite.addTest(new InterpreterTest("testParsing2"));
       //suite.addTest(new InterpreterTest("testParsing3"));
       return suite;
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message