used in the method git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277213 13f79535-47bb-0310-9956-ffa450edef68master
@@ -83,6 +83,38 @@ | |||||
</target> | </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"> | <target name="testMappedFilelist"> | ||||
<touch millis="${mappermillis}"> | <touch millis="${mappermillis}"> | ||||
<filelist dir="." files="idonotexist" /> | <filelist dir="." files="idonotexist" /> | ||||
@@ -168,7 +168,7 @@ public class Touch extends Task { | |||||
* @param mapper the <code>Mapper</code> to add. | * @param mapper the <code>Mapper</code> to add. | ||||
* @since Ant 1.6.3 | * @since Ant 1.6.3 | ||||
*/ | */ | ||||
public void addMapper(Mapper mapper) { | |||||
public void addConfiguredMapper(Mapper mapper) { | |||||
add(mapper.getImplementation()); | add(mapper.getImplementation()); | ||||
} | } | ||||
@@ -109,6 +109,13 @@ public class TouchTest extends BuildFileTest { | |||||
executeTarget("testMappedFileset"); | executeTarget("testMappedFileset"); | ||||
} | } | ||||
/** | |||||
* test the explicit mapped file set | |||||
*/ | |||||
public void testExplicitMappedFileset() { | |||||
executeTarget("testExplicitMappedFileset"); | |||||
} | |||||
/** | /** | ||||
* test the mapped file list | * test the mapped file list | ||||
*/ | */ | ||||