Browse Source

fixing test for gump

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1077973 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 14 years ago
parent
commit
20372c38fa
1 changed files with 11 additions and 12 deletions
  1. +11
    -12
      src/tests/antunit/types/javaresource-test.xml

+ 11
- 12
src/tests/antunit/types/javaresource-test.xml View File

@@ -19,41 +19,40 @@
<import file="../antunit-base.xml" />

<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 name="testReadFromFile" depends="setUp">
<concat>
<javaresource name="foo.txt">
<classpath location="${input}"/>
<classpath location="${resources}"/>
</javaresource>
</concat>
<au:assertLogContains text="Hello, world"/>
<loadproperties>
<javaresource name="x.properties">
<classpath location="${input}"/>
<classpath location="${resources}"/>
</javaresource>
</loadproperties>
<au:assertPropertyEquals name="a" value="b"/>
</target>

<target name="testReadFromJar" depends="setUp">
<delete dir="${input}"/>
<jar destfile="${test.jar}">
<fileset dir="${resources}"/>
</jar>
<delete dir="${resources}"/>
<concat>
<javaresource name="foo.txt">
<classpath location="${output}/javaresource-test.jar"/>
<classpath location="${test.jar}"/>
</javaresource>
</concat>
<au:assertLogContains text="Hello, world"/>
<loadproperties>
<javaresource name="x.properties">
<classpath location="${output}/javaresource-test.jar"/>
<classpath location="${test.jar}"/>
</javaresource>
</loadproperties>
<au:assertPropertyEquals name="a" value="b"/>


Loading…
Cancel
Save