geirm       01/04/22 15:44:20

  Modified:    src/java/org/apache/velocity/test/misc Test.java
  Log:
  added acceptance of parameter for encoding testing..
  
  Revision  Changes    Path
  1.27      +17 -4     
jakarta-velocity/src/java/org/apache/velocity/test/misc/Test.java
  
  Index: Test.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/test/misc/Test.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Test.java 2001/04/20 04:31:58     1.26
  +++ Test.java 2001/04/22 22:44:19     1.27
  @@ -95,7 +95,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
  - * @version $Id: Test.java,v 1.26 2001/04/20 04:31:58 geirm Exp $
  + * @version $Id: Test.java,v 1.27 2001/04/22 22:44:19 geirm Exp $
    */
   public class Test implements ReferenceInsertionEventHandler, 
                                NullSetEventHandler,NullReferenceEventHandler,
  @@ -106,7 +106,7 @@
        */
       private static Stack writerStack = new Stack();
   
  -    public Test(String templateFile)
  +    public Test(String templateFile, String encoding)
       {
           Writer writer = null;
           TestProvider provider = new TestProvider();
  @@ -203,7 +203,7 @@
   
               try 
               {
  -                template = Runtime.getTemplate(templateFile);
  +                template = Runtime.getTemplate(templateFile, encoding);
               }
               catch( ResourceNotFoundException rnfe )
               {
  @@ -331,6 +331,19 @@
       public static void main(String[] args)
       {
           Test t;
  -        t = new Test(args[0]);
  +
  +        String encoding = "ISO-8859-1";
  +
  +        if( args.length > 1 )
  +            encoding = args[1];
  +
  +        t = new Test(args[0], encoding);
       }
   }
  +
  +
  +
  +
  +
  +
  +
  
  
  

Reply via email to