ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/lib/optional junit.jar
Date Wed, 25 Jul 2001 14:40:55 GMT
conor       01/07/25 07:40:54

  Modified:    src/etc/testcases/taskdefs property.xml
               src/main/org/apache/tools/ant Target.java
               src/testcases/org/apache/tools/ant/taskdefs
                        PropertyTest.java TaskdefsTest.java
               lib/optional junit.jar
  Added:       src/etc/testcases/taskdefs property1.properties
                        property2.properties
  Log:
  Add tests for property resolution in property files
  Update JUnit jar to latest version (3.7)
  
  Revision  Changes    Path
  1.3       +11 -0     jakarta-ant/src/etc/testcases/taskdefs/property.xml
  
  Index: property.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/etc/testcases/taskdefs/property.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- property.xml	2001/02/18 13:44:41	1.2
  +++ property.xml	2001/07/25 14:40:54	1.3
  @@ -5,4 +5,15 @@
     <target name="test1">
       <property environment="testenv"/>
     </target>
  +
  +  <target name="test2">
  +    <property name="testprop1" value="aa"/>
  +    <property file="property1.properties"/>
  +    <echo message="testprop1=${testprop1}, testprop3=${testprop3}, testprop4=${testprop4}"/>
  +  </target>
  +
  +  <target name="test3">
  +    <property file="property2.properties"/>
  +  </target>
  +
   </project>
  
  
  
  1.1                  jakarta-ant/src/etc/testcases/taskdefs/property1.properties
  
  Index: property1.properties
  ===================================================================
  testprop2=xx
  testprop3=${testprop2}yy
  testprop4=${testprop1}zz
  
  
  
  1.1                  jakarta-ant/src/etc/testcases/taskdefs/property2.properties
  
  Index: property2.properties
  ===================================================================
  testprop1=aa${testprop2}bb
  testprop2=cc${testprop1}dd
  
  
  
  
  1.20      +1 -0      jakarta-ant/src/main/org/apache/tools/ant/Target.java
  
  Index: Target.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Target.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- Target.java	2001/07/22 13:12:28	1.19
  +++ Target.java	2001/07/25 14:40:54	1.20
  @@ -184,6 +184,7 @@
           }
           catch(RuntimeException exc) {
               project.fireTargetFinished(this, exc);
  +            System.out.println("Caught exception = " + exc.getMessage());
               throw exc;
           }
       }
  
  
  
  1.3       +19 -0     jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/PropertyTest.java
  
  Index: PropertyTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/PropertyTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PropertyTest.java	2001/02/18 13:44:43	1.2
  +++ PropertyTest.java	2001/07/25 14:40:54	1.3
  @@ -54,6 +54,8 @@
   
   package org.apache.tools.ant.taskdefs;
   
  +import org.apache.tools.ant.*;
  +
   /**
    * @author Conor MacNeill
    */
  @@ -71,4 +73,21 @@
           // should get no output at all
           expectOutputAndError("test1", "", "");
       }
  +
  +    public void test2() { 
  +        expectLog("test2", "testprop1=aa, testprop3=xxyy, testprop4=aazz");
  +    }
  +    
  +    public void test3() {
  +        try {
  +            executeTarget("test3");
  +        }
  +        catch (BuildException e) {
  +            assertEquals("Circular definition not detected - ", true,
  +                     e.getMessage().indexOf("was circularly defined") != -1);
  +            return;                     
  +        }
  +        fail("Did not throw exception on circular exception");                     
  +    }
  +
   }
  
  
  
  1.6       +1 -1      jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TaskdefsTest.java
  
  Index: TaskdefsTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/testcases/org/apache/tools/ant/taskdefs/TaskdefsTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TaskdefsTest.java	2001/03/08 15:17:25	1.5
  +++ TaskdefsTest.java	2001/07/25 14:40:54	1.6
  @@ -170,7 +170,7 @@
       }
   
       protected void expectSpecificBuildException(String taskname, String cause, String msg)
{ 
  -        try { 
  +        try {
               executeTarget(taskname);
           } catch (org.apache.tools.ant.BuildException ex) {
               if ((null != msg) && (ex.getMessage() != msg)) {
  
  
  
  1.2       +425 -336  jakarta-ant/lib/optional/junit.jar
  
  	<<Binary file>>
  
  

Mime
View raw message