|
@@ -19,41 +19,40 @@ |
|
|
<import file="../antunit-base.xml" /> |
|
|
<import file="../antunit-base.xml" /> |
|
|
|
|
|
|
|
|
<target name="setUp"> |
|
|
<target name="setUp"> |
|
|
<mkdir dir="${input}"/> |
|
|
|
|
|
<echo file="${input}/foo.txt">Hello, world</echo> |
|
|
|
|
|
<echo file="${input}/x.properties">a=b</echo> |
|
|
|
|
|
<mkdir dir="${output}"/> |
|
|
|
|
|
<jar destfile="${output}/javaresource-test.jar"> |
|
|
|
|
|
<fileset dir="${input}"/> |
|
|
|
|
|
</jar> |
|
|
|
|
|
|
|
|
<mkdir dir="${resources}"/> |
|
|
|
|
|
<echo file="${resources}/foo.txt">Hello, world</echo> |
|
|
|
|
|
<echo file="${resources}/x.properties">a=b</echo> |
|
|
</target> |
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="testReadFromFile" depends="setUp"> |
|
|
<target name="testReadFromFile" depends="setUp"> |
|
|
<concat> |
|
|
<concat> |
|
|
<javaresource name="foo.txt"> |
|
|
<javaresource name="foo.txt"> |
|
|
<classpath location="${input}"/> |
|
|
|
|
|
|
|
|
<classpath location="${resources}"/> |
|
|
</javaresource> |
|
|
</javaresource> |
|
|
</concat> |
|
|
</concat> |
|
|
<au:assertLogContains text="Hello, world"/> |
|
|
<au:assertLogContains text="Hello, world"/> |
|
|
<loadproperties> |
|
|
<loadproperties> |
|
|
<javaresource name="x.properties"> |
|
|
<javaresource name="x.properties"> |
|
|
<classpath location="${input}"/> |
|
|
|
|
|
|
|
|
<classpath location="${resources}"/> |
|
|
</javaresource> |
|
|
</javaresource> |
|
|
</loadproperties> |
|
|
</loadproperties> |
|
|
<au:assertPropertyEquals name="a" value="b"/> |
|
|
<au:assertPropertyEquals name="a" value="b"/> |
|
|
</target> |
|
|
</target> |
|
|
|
|
|
|
|
|
<target name="testReadFromJar" depends="setUp"> |
|
|
<target name="testReadFromJar" depends="setUp"> |
|
|
<delete dir="${input}"/> |
|
|
|
|
|
|
|
|
<jar destfile="${test.jar}"> |
|
|
|
|
|
<fileset dir="${resources}"/> |
|
|
|
|
|
</jar> |
|
|
|
|
|
<delete dir="${resources}"/> |
|
|
<concat> |
|
|
<concat> |
|
|
<javaresource name="foo.txt"> |
|
|
<javaresource name="foo.txt"> |
|
|
<classpath location="${output}/javaresource-test.jar"/> |
|
|
|
|
|
|
|
|
<classpath location="${test.jar}"/> |
|
|
</javaresource> |
|
|
</javaresource> |
|
|
</concat> |
|
|
</concat> |
|
|
<au:assertLogContains text="Hello, world"/> |
|
|
<au:assertLogContains text="Hello, world"/> |
|
|
<loadproperties> |
|
|
<loadproperties> |
|
|
<javaresource name="x.properties"> |
|
|
<javaresource name="x.properties"> |
|
|
<classpath location="${output}/javaresource-test.jar"/> |
|
|
|
|
|
|
|
|
<classpath location="${test.jar}"/> |
|
|
</javaresource> |
|
|
</javaresource> |
|
|
</loadproperties> |
|
|
</loadproperties> |
|
|
<au:assertPropertyEquals name="a" value="b"/> |
|
|
<au:assertPropertyEquals name="a" value="b"/> |
|
|