git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@782934 13f79535-47bb-0310-9956-ffa450edef68master
@@ -20,11 +20,12 @@ | |||||
<import file="../antunit-base.xml" /> | <import file="../antunit-base.xml" /> | ||||
<property name="file" location="${output}test.mf"/> | |||||
<property name="file" location="${output}/test.mf"/> | |||||
<target name="test8IsAllowed" | <target name="test8IsAllowed" | ||||
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=45675" | description="https://issues.apache.org/bugzilla/show_bug.cgi?id=45675" | ||||
> | > | ||||
<mkdir dir="${output}"/> | |||||
<manifest file="${file}"> | <manifest file="${file}"> | ||||
<attribute name="attrib8" value="test attribute"/> | <attribute name="attrib8" value="test attribute"/> | ||||
</manifest> | </manifest> | ||||
@@ -18,9 +18,13 @@ | |||||
<project name="retry-test" default="antunit" xmlns:au="antlib:org.apache.ant.antunit"> | <project name="retry-test" default="antunit" xmlns:au="antlib:org.apache.ant.antunit"> | ||||
<import file="../antunit-base.xml"/> | <import file="../antunit-base.xml"/> | ||||
<target name="test-fail-and-retry"> | |||||
<target name="setUp"> | |||||
<property name="i" value="3"/> | <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... --> | <!-- just in case this ever becomes a legit url... --> | ||||
<property name="src" value="http://iojasodjojaosdj"/> | <property name="src" value="http://iojasodjojaosdj"/> | ||||
<au:expectfailure expectedmessage="Task [get] failed after [${i}] attempts; giving up"> | <au:expectfailure expectedmessage="Task [get] failed after [${i}] attempts; giving up"> | ||||
@@ -31,9 +35,7 @@ | |||||
<au:assertLogContains text="Attempt [1]: error occurred; retrying..."/> | <au:assertLogContains text="Attempt [1]: error occurred; retrying..."/> | ||||
</target> | </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}"> | <retry retrycount="${i}"> | ||||
<touch file="${dest}"/> | <touch file="${dest}"/> | ||||
</retry> | </retry> | ||||
@@ -64,6 +64,7 @@ public class DirSetTest extends AbstractFileSetTest { | |||||
public void testToString() throws Exception { | public void testToString() throws Exception { | ||||
File tmp = File.createTempFile("DirSetTest", ""); | File tmp = File.createTempFile("DirSetTest", ""); | ||||
try { | |||||
tmp.delete(); | tmp.delete(); | ||||
File a = new File(tmp, "a"); | File a = new File(tmp, "a"); | ||||
a.mkdirs(); | a.mkdirs(); | ||||
@@ -78,6 +79,15 @@ public class DirSetTest extends AbstractFileSetTest { | |||||
ds.setDir(tmp); | ds.setDir(tmp); | ||||
ds.setIncludes("b/"); | ds.setIncludes("b/"); | ||||
assertEquals("b;b" + File.separator + "c", ds.toString()); | 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(); | |||||
} | |||||
} | } | ||||
} | } |