|
|
@@ -1,42 +1,42 @@ |
|
|
|
<project default="all" xmlns:au="antlib:org.apache.ant.antunit">
|
|
|
|
<property name="ant-build" location="../../../../build"/>
|
|
|
|
<property name="build-dir"
|
|
|
|
location="${ant-build}/ant-unit/whichresource/build"/>
|
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<delete quiet="yes" dir="${build-dir}"/>
|
|
|
|
<mkdir dir="${build-dir}"/>
|
|
|
|
<javac srcdir="javac-dir/good-src" destdir="${build-dir}"/>
|
|
|
|
<path id="whichresource-build" path="${build-dir}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="test-reference" depends="init">
|
|
|
|
<whichresource
|
|
|
|
property="whichresource.prop"
|
|
|
|
class="Simple"
|
|
|
|
classpathref="whichresource-build"/>
|
|
|
|
|
|
|
|
<au:assertTrue>
|
|
|
|
<contains string="${whichresource.prop}"
|
|
|
|
substring="Simple.class"/>
|
|
|
|
</au:assertTrue>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="test-not-present" depends="init">
|
|
|
|
<whichresource
|
|
|
|
property="whichresource2.prop"
|
|
|
|
class="ClassNotPresent"
|
|
|
|
classpathref="whichresource-build"/>
|
|
|
|
|
|
|
|
<au:assertFalse>
|
|
|
|
<isset property="whichresource.prop2"/>
|
|
|
|
</au:assertFalse>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="all">
|
|
|
|
<au:antunit>
|
|
|
|
<fileset file="${ant.file}"/>
|
|
|
|
<au:plainlistener/>
|
|
|
|
</au:antunit>
|
|
|
|
</target>
|
|
|
|
</project>
|
|
|
|
<project default="all" xmlns:au="antlib:org.apache.ant.antunit"> |
|
|
|
<property name="ant-build" location="../../../../build"/> |
|
|
|
<property name="build-dir" |
|
|
|
location="${ant-build}/ant-unit/whichresource/build"/> |
|
|
|
|
|
|
|
<target name="init"> |
|
|
|
<delete quiet="yes" dir="${build-dir}"/> |
|
|
|
<mkdir dir="${build-dir}"/> |
|
|
|
<javac srcdir="javac-dir/good-src" destdir="${build-dir}"/> |
|
|
|
<path id="whichresource-build" path="${build-dir}"/> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="test-reference" depends="init"> |
|
|
|
<whichresource |
|
|
|
property="whichresource.prop" |
|
|
|
class="Simple" |
|
|
|
classpathref="whichresource-build"/> |
|
|
|
|
|
|
|
<au:assertTrue> |
|
|
|
<contains string="${whichresource.prop}" |
|
|
|
substring="Simple.class"/> |
|
|
|
</au:assertTrue> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="test-not-present" depends="init"> |
|
|
|
<whichresource |
|
|
|
property="whichresource2.prop" |
|
|
|
class="ClassNotPresent" |
|
|
|
classpathref="whichresource-build"/> |
|
|
|
|
|
|
|
<au:assertFalse> |
|
|
|
<isset property="whichresource.prop2"/> |
|
|
|
</au:assertFalse> |
|
|
|
</target> |
|
|
|
|
|
|
|
<target name="all"> |
|
|
|
<au:antunit> |
|
|
|
<fileset file="${ant.file}"/> |
|
|
|
<au:plainlistener/> |
|
|
|
</au:antunit> |
|
|
|
</target> |
|
|
|
</project> |