Browse Source

allow AntUnit tests to pass on Windows even if the created jar cannot be deleted. This will likely leave test.jar lying around in $TEMP on Windows.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@917956 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
de0fc904c5
1 changed files with 6 additions and 7 deletions
  1. +6
    -7
      src/tests/antunit/taskdefs/import-url-test.xml

+ 6
- 7
src/tests/antunit/taskdefs/import-url-test.xml View File

@@ -40,15 +40,15 @@
<echo file="${input}/a/c/test.properties"><![CDATA[
foo=bar
]]></echo>
<mkdir dir="${output}"/>
<jar destfile="${output}/test.jar">
<property name="test.jar" location="${java.io.tmpdir}/test.jar"/>
<jar destfile="${test.jar}">
<fileset dir="${input}"/>
</jar>
<delete dir="${input}"/>

<import>
<javaresource name="a/b/outer.xml">
<classpath location="${output}/test.jar"/>
<classpath location="${test.jar}"/>
</javaresource>
</import>

@@ -58,15 +58,14 @@ foo=bar
<au:assertLogContains text="foo is bar"/>
</target>

<target name="tearDown" depends="close, antunit-base.tearDown"/>

<target name="close">
<target name="tearDown" depends="antunit-base.tearDown">
<taskdef name="close"
classname="org.apache.tools.ant.taskdefs.CloseResources"/>
<close>
<javaresource name="a/b/outer.xml">
<classpath location="${output}/test.jar"/>
<classpath location="${test.jar}"/>
</javaresource>
</close>
<delete file="${test.jar}" quiet="true" deleteonexit="true"/>
</target>
</project>

Loading…
Cancel
Save