peterreilly    2004/12/15 09:23:25

  Modified:    src/main/org/apache/tools/ant/taskdefs Touch.java
               src/testcases/org/apache/tools/ant/taskdefs TouchTest.java
               src/etc/testcases/taskdefs touch.xml
  Log:
  use Touch#addConfigured(Mapper) rather than add(Mapper) as the mapper is
  used in the method
  
  Revision  Changes    Path
  1.42      +1 -1      ant/src/main/org/apache/tools/ant/taskdefs/Touch.java
  
  Index: Touch.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Touch.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- Touch.java        14 Dec 2004 17:56:34 -0000      1.41
  +++ Touch.java        15 Dec 2004 17:23:24 -0000      1.42
  @@ -168,7 +168,7 @@
        * @param mapper the <code>Mapper</code> to add.
        * @since Ant 1.6.3
        */
  -    public void addMapper(Mapper mapper) {
  +    public void addConfiguredMapper(Mapper mapper) {
           add(mapper.getImplementation());
       }
   
  
  
  
  1.10      +7 -0      
ant/src/testcases/org/apache/tools/ant/taskdefs/TouchTest.java
  
  Index: TouchTest.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/TouchTest.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TouchTest.java    14 Dec 2004 17:56:35 -0000      1.9
  +++ TouchTest.java    15 Dec 2004 17:23:25 -0000      1.10
  @@ -110,6 +110,13 @@
       }
   
       /**
  +     * test the explicit mapped file set
  +     */
  +    public void testExplicitMappedFileset() {
  +        executeTarget("testExplicitMappedFileset");
  +    }
  +
  +    /**
        * test the mapped file list
        */
       public void testMappedFilelist() {
  
  
  
  1.6       +32 -0     ant/src/etc/testcases/taskdefs/touch.xml
  
  Index: touch.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/touch.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- touch.xml 15 Dec 2004 16:09:27 -0000      1.5
  +++ touch.xml 15 Dec 2004 17:23:25 -0000      1.6
  @@ -83,6 +83,38 @@
   
     </target>
   
  +  <target name="testExplicitMappedFileset">
  +    <touch file="touchtest" millis="${mappermillis}" />
  +    <touch>
  +      <fileset file="touchtest" />
  +      <mapper>
  +        <compositemapper>
  +          <globmapper from="*" to="*foo" />
  +          <globmapper from="*" to="*bar" />
  +        </compositemapper>
  +      </mapper>
  +    </touch>
  +
  +    <fail>
  +      <condition>
  +        <not>
  +          <and>
  +            <isfileselected file="touchtest">
  +              <selector refid="map.selector" />
  +            </isfileselected>
  +            <isfileselected file="touchtestfoo">
  +              <selector refid="map.selector" />
  +            </isfileselected>
  +            <isfileselected file="touchtestbar">
  +              <selector refid="map.selector" />
  +            </isfileselected>
  +          </and>
  +        </not>
  +      </condition>
  +    </fail>
  +
  +  </target>
  +
     <target name="testMappedFilelist">
       <touch millis="${mappermillis}">
         <filelist dir="." files="idonotexist" />
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to