|
|
@@ -0,0 +1,36 @@ |
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<project default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
|
|
|
|
|
|
|
|
<!-- note relies on antunit built from svn trunk (1.1-alpha) -->
|
|
|
|
<import file="../antunit-base.xml" />
|
|
|
|
|
|
|
|
<target name="setUp">
|
|
|
|
<mkdir dir="${java.io.tmpdir}/gzip-test" />
|
|
|
|
<mkdir dir="${java.io.tmpdir}/gzip-test/empty" />
|
|
|
|
<touch file="${java.io.tmpdir}/gzip-test/fileone" />
|
|
|
|
<touch file="${java.io.tmpdir}/gzip-test/filetwo" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="tearDown">
|
|
|
|
<delete includeemptydirs="true">
|
|
|
|
<fileset dir="${java.io.tmpdir}/gzip-test" />
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="testFailNone">
|
|
|
|
<au:expectfailure expectedmessage="No resource selected, gzip needs exactly one resource." message="Should have thrown an exception">
|
|
|
|
<gzip destfile="${java.io.tmpdir}/gzip-test/file.gz">
|
|
|
|
<fileset dir="${java.io.tmpdir}/gzip-test/empty" />
|
|
|
|
</gzip>
|
|
|
|
</au:expectfailure>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="testFailTwo">
|
|
|
|
<au:expectfailure expectedmessage="gzip cannot handle multiple resources at once. (2 resources were selected.)" message="Should have thrown an exception">
|
|
|
|
<gzip destfile="${java.io.tmpdir}/gzip-test/file.gz">
|
|
|
|
<fileset dir="${java.io.tmpdir}/gzip-test" />
|
|
|
|
</gzip>
|
|
|
|
</au:expectfailure>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|