|
|
@@ -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> |