You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2010/03/02 12:03:41 UTC
svn commit: r917956 -
/ant/core/trunk/src/tests/antunit/taskdefs/import-url-test.xml
Author: bodewig
Date: Tue Mar 2 11:03:41 2010
New Revision: 917956
URL: http://svn.apache.org/viewvc?rev=917956&view=rev
Log:
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.
Modified:
ant/core/trunk/src/tests/antunit/taskdefs/import-url-test.xml
Modified: ant/core/trunk/src/tests/antunit/taskdefs/import-url-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/import-url-test.xml?rev=917956&r1=917955&r2=917956&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/import-url-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/import-url-test.xml Tue Mar 2 11:03:41 2010
@@ -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 @@
<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>