ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/etc/testcases/taskdefs calltarget.xml
Date Tue, 05 Aug 2003 13:56:27 GMT
peterreilly    2003/08/05 06:56:27

  Modified:    src/testcases/org/apache/tools/ant/taskdefs
                        CallTargetTest.java
               src/etc/testcases/taskdefs calltarget.xml
  Log:
  test case to show bug report 11418
  PR: 11418
  Obtained from: John-Mason P. Shackelford
  
  Revision  Changes    Path
  1.3       +12 -0     ant/src/testcases/org/apache/tools/ant/taskdefs/CallTargetTest.java
  
  Index: CallTargetTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/CallTargetTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CallTargetTest.java	22 Jul 2003 16:09:05 -0000	1.2
  +++ CallTargetTest.java	5 Aug 2003 13:56:26 -0000	1.3
  @@ -54,6 +54,8 @@
   
   package org.apache.tools.ant.taskdefs;
   
  +import java.util.Vector;
  +
   import org.apache.tools.ant.BuildFileTest;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.util.JavaEnvUtils;
  @@ -81,6 +83,16 @@
           project.executeTarget("testinheritreffilterset");
       }
   
  +    // see bugrep 11418 (In repeated calls to the same target,
  +    // params will not be passed in)
  +    public void testMultiCall() {
  +        Vector v = new Vector();
  +        v.add("call-multi");
  +        v.add("call-multi");
  +        project.executeTargets(v);
  +        assertLogContaining("multi is SETmulti is SET");
  +    }
  +    
       public void tearDown() {
           project.executeTarget("cleanup");
       }
  
  
  
  1.3       +9 -1      ant/src/etc/testcases/taskdefs/calltarget.xml
  
  Index: calltarget.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/calltarget.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- calltarget.xml	28 Jul 2003 00:16:06 -0000	1.2
  +++ calltarget.xml	5 Aug 2003 13:56:26 -0000	1.3
  @@ -41,5 +41,13 @@
          <fail message="filterset not properly passed across by antcall" unless="success"/>
       </target>
   
  -
  +    <property name="multi" value="DEFAULT"/>
  +    <target name="multi">
  +        <echo>multi is ${multi}</echo>
  +    </target>
  +    <target name="call-multi">
  +        <antcall target="multi">
  +            <param name="multi" value="SET"/>
  +        </antcall>
  +    </target>
   </project>
  
  
  

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


Mime
View raw message