ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbaill...@apache.org
Subject cvs commit: jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional TraXLiaisonTest.java
Date Fri, 16 Nov 2001 21:40:59 GMT
sbailliez    01/11/16 13:40:59

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional
                        TraXLiaisonTest.java
  Log:
  Adding test to demonstrate multiple files transform for trax as filed in bug 4335
  
  Revision  Changes    Path
  1.3       +19 -0     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java
  
  Index: TraXLiaisonTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/optional/TraXLiaisonTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TraXLiaisonTest.java	2001/08/18 14:59:40	1.2
  +++ TraXLiaisonTest.java	2001/11/16 21:40:59	1.3
  @@ -1,6 +1,7 @@
   package org.apache.tools.ant.taskdefs.optional;
   
   import org.apache.tools.ant.taskdefs.XSLTLiaison;
  +import org.apache.tools.ant.BuildException;
   
   import java.io.File;
   
  @@ -82,6 +83,24 @@
               liaison.transform(in, out);
           } finally {
               out.delete();
  +        }
  +    }
  +
  +    public void testMultipleTransform() throws Exception {
  +        File xsl = getFile("/taskdefs/optional/xsltliaison-in.xsl");
  +        liaison.setStylesheet(xsl);
  +        liaison.addParam("param", "value");
  +        File in = getFile("/taskdefs/optional/xsltliaison-in.xml");
  +        // test for 10 consecutives transform
  +        for (int i = 0; i < 50; i++){
  +            File out = new File("xsltliaison" + i + ".tmp");
  +            try {
  +                liaison.transform(in, out);
  +            } catch (Exception e){
  +                throw new BuildException("failed in transform " + i, e);
  +            } finally {
  +                out.delete();
  +            }
           }
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message