| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <project name="filter-test" basedir="." default="test1"> |
| |
| <target name="test1"> |
| <filter/> |
| </target> |
| |
| <target name="test2"> |
| <filter token=""/> |
| </target> |
| |
| <target name="test3"> |
| <filter value=""/> |
| </target> |
| |
| <target name="test4"> |
| <filter token="" value=""/> |
| </target> |
| |
| <target name="test5"> |
| <filter token="year" value="2000" /> |
| <copy file="filter1.txt" tofile="filtered.tmp" filtering="yes" overwrite="yes" /> |
| </target> |
| |
| <target name="test6"> |
| <filter token="year" value="2000" /> |
| <copy todir="./taskdefs.tmp" filtering="yes" overwrite="yes"> |
| <fileset dir="." includes="filter1.txt" /> |
| </copy> |
| </target> |
| |
| <target name="test7"> |
| <filter token="ROOT" value="root" /> |
| <copy file="filter2.txt" tofile="filtered.tmp" filtering="yes" overwrite="yes" /> |
| </target> |
| |
| <target name="test8"> |
| <filter token="ROOT" value="root" /> |
| <copy todir="./taskdefs.tmp" filtering="yes" overwrite="yes"> |
| <fileset dir="." includes="filter2.txt"/> |
| </copy> |
| </target> |
| |
| <target name="test9"> |
| <filter filtersfile="filterdefs.properties" /> |
| <copy todir="./taskdefs.tmp" filtering="yes" overwrite="yes"> |
| <fileset dir="." includes="filter3.txt"/> |
| </copy> |
| </target> |
| |
| <target name="cleanup"> |
| <delete dir="taskdefs.tmp" /> |
| </target> |
| |
| </project> |