ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r782934 - in /ant/core/trunk/src/tests: antunit/taskdefs/manifest-test.xml antunit/taskdefs/retry-test.xml junit/org/apache/tools/ant/types/DirSetTest.java
Date Tue, 09 Jun 2009 09:55:37 GMT
Author: bodewig
Date: Tue Jun  9 09:55:36 2009
New Revision: 782934

URL: http://svn.apache.org/viewvc?rev=782934&view=rev
Log:
clean up test files/dirs

Modified:
    ant/core/trunk/src/tests/antunit/taskdefs/manifest-test.xml
    ant/core/trunk/src/tests/antunit/taskdefs/retry-test.xml
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java

Modified: ant/core/trunk/src/tests/antunit/taskdefs/manifest-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/manifest-test.xml?rev=782934&r1=782933&r2=782934&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/manifest-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/manifest-test.xml Tue Jun  9 09:55:36 2009
@@ -20,11 +20,12 @@
 
   <import file="../antunit-base.xml" />
 
-  <property name="file" location="${output}test.mf"/>
+  <property name="file" location="${output}/test.mf"/>
 
   <target name="test8IsAllowed"
           description="https://issues.apache.org/bugzilla/show_bug.cgi?id=45675"
           >
+    <mkdir dir="${output}"/>
     <manifest file="${file}">
       <attribute name="attrib8" value="test attribute"/>
     </manifest>

Modified: ant/core/trunk/src/tests/antunit/taskdefs/retry-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/retry-test.xml?rev=782934&r1=782933&r2=782934&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/retry-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/retry-test.xml Tue Jun  9 09:55:36 2009
@@ -18,9 +18,13 @@
 <project name="retry-test" default="antunit" xmlns:au="antlib:org.apache.ant.antunit">
   <import file="../antunit-base.xml"/>
 
-  <target name="test-fail-and-retry">
+  <target name="setUp">
     <property name="i" value="3"/>
-    <property name="dest" value="${java.io.tmpdir}/dest"/>
+    <mkdir dir="${output}"/>
+    <property name="dest" value="${output}/dest"/>
+  </target>
+
+  <target name="test-fail-and-retry" depends="setUp">
     <!-- just in case this ever becomes a legit url... -->
     <property name="src" value="http://iojasodjojaosdj"/>
     <au:expectfailure expectedmessage="Task [get] failed after [${i}] attempts; giving
up">
@@ -31,9 +35,7 @@
     <au:assertLogContains text="Attempt [1]: error occurred; retrying..."/>
   </target>
 
-  <target name="test-success">
-    <property name="i" value="3"/>
-    <property name="dest" value="${java.io.tmpdir}/dest"/>
+  <target name="test-success" depends="setUp">
     <retry retrycount="${i}">
       <touch file="${dest}"/>
     </retry>

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java?rev=782934&r1=782933&r2=782934&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/types/DirSetTest.java Tue Jun  9 09:55:36
2009
@@ -64,6 +64,7 @@
 
     public void testToString() throws Exception {
         File tmp = File.createTempFile("DirSetTest", "");
+        try {
         tmp.delete();
         File a = new File(tmp, "a");
         a.mkdirs();
@@ -78,6 +79,15 @@
         ds.setDir(tmp);
         ds.setIncludes("b/");
         assertEquals("b;b" + File.separator + "c", ds.toString());
+        } finally {
+            new File(tmp, "a/x").delete();
+            new File(tmp, "a").delete();
+            new File(tmp, "b/c/x").delete();
+            new File(tmp, "b/c").delete();
+            new File(tmp, "b/x").delete();
+            new File(tmp, "b").delete();
+            tmp.delete();
+        }
     }
 
 }



Mime
View raw message