Browse Source

embrace antunit-base

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1062723 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 14 years ago
parent
commit
9585f199b3
1 changed files with 13 additions and 21 deletions
  1. +13
    -21
      src/tests/antunit/core/uuencode/uuencode-test.xml

+ 13
- 21
src/tests/antunit/core/uuencode/uuencode-test.xml View File

@@ -15,39 +15,31 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<project default="all" xmlns:au="antlib:org.apache.ant.antunit">
<project default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
<import file="../../antunit-base.xml"/>

<property name="ant.build.dir" location="../../../../../build"/>
<property name="my.build.dir"
location="${ant.build.dir}/ant-unit/uuencode-dir"/>
<property name="classes.dir" location="${output}"/>

<available property="sun.uudecode.avail" classname="sun.misc.UUDecoder"/>
<target name="setUp">
<mkdir dir="${input}"/>
<mkdir dir="${output}"/>
<available property="sun.uudecode.avail" classname="sun.misc.UUDecoder"/>
</target>

<target name="define" if="sun.uudecode.avail">
<mkdir dir="${classes.dir}"/>
<javac srcdir="src" destdir="${classes.dir}" debug="yes"/>
<javac srcdir="src" destdir="${output}" debug="yes"/>
<taskdef name="uuencode" classname="task.UUEncodeTask"
classpath="${classes.dir}"/>
classpath="${output}"/>
<taskdef name="uudecode" classname="task.UUDecodeTask"
classpath="${classes.dir}"/>
classpath="${output}"/>
</target>

<target name="test-simple" depends="define" if="sun.uudecode.avail">
<uuencode infile="${ant.file}"
outfile="${my.build.dir}/uuencoded"/>
<uudecode infile="${my.build.dir}/uuencoded"
outfile="${my.build.dir}/decoded"/>
outfile="${input}/uuencoded"/>
<uudecode infile="${input}/uuencoded"
outfile="${input}/decoded"/>
<au:assertTrue>
<filesmatch file1="${ant.file}" file2="${my.build.dir}/decoded"/>
<filesmatch file1="${ant.file}" file2="${input}/decoded"/>
</au:assertTrue>
</target>

<target name="all">
<au:antunit>
<fileset file="${ant.file}"/>
<au:plainlistener/>
</au:antunit>
</target>
</project>

Loading…
Cancel
Save