Update JUnit jar to latest version (3.7) git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269389 13f79535-47bb-0310-9956-ffa450edef68master
@@ -5,4 +5,15 @@ | |||||
<target name="test1"> | <target name="test1"> | ||||
<property environment="testenv"/> | <property environment="testenv"/> | ||||
</target> | </target> | ||||
<target name="test2"> | |||||
<property name="testprop1" value="aa"/> | |||||
<property file="property1.properties"/> | |||||
<echo message="testprop1=${testprop1}, testprop3=${testprop3}, testprop4=${testprop4}"/> | |||||
</target> | |||||
<target name="test3"> | |||||
<property file="property2.properties"/> | |||||
</target> | |||||
</project> | </project> |
@@ -0,0 +1,3 @@ | |||||
testprop2=xx | |||||
testprop3=${testprop2}yy | |||||
testprop4=${testprop1}zz |
@@ -0,0 +1,3 @@ | |||||
testprop1=aa${testprop2}bb | |||||
testprop2=cc${testprop1}dd | |||||
@@ -184,6 +184,7 @@ public class Target implements TaskContainer { | |||||
} | } | ||||
catch(RuntimeException exc) { | catch(RuntimeException exc) { | ||||
project.fireTargetFinished(this, exc); | project.fireTargetFinished(this, exc); | ||||
System.out.println("Caught exception = " + exc.getMessage()); | |||||
throw exc; | throw exc; | ||||
} | } | ||||
} | } | ||||
@@ -54,6 +54,8 @@ | |||||
package org.apache.tools.ant.taskdefs; | package org.apache.tools.ant.taskdefs; | ||||
import org.apache.tools.ant.*; | |||||
/** | /** | ||||
* @author Conor MacNeill | * @author Conor MacNeill | ||||
*/ | */ | ||||
@@ -71,4 +73,21 @@ public class PropertyTest extends TaskdefsTest { | |||||
// should get no output at all | // should get no output at all | ||||
expectOutputAndError("test1", "", ""); | expectOutputAndError("test1", "", ""); | ||||
} | } | ||||
public void test2() { | |||||
expectLog("test2", "testprop1=aa, testprop3=xxyy, testprop4=aazz"); | |||||
} | |||||
public void test3() { | |||||
try { | |||||
executeTarget("test3"); | |||||
} | |||||
catch (BuildException e) { | |||||
assertEquals("Circular definition not detected - ", true, | |||||
e.getMessage().indexOf("was circularly defined") != -1); | |||||
return; | |||||
} | |||||
fail("Did not throw exception on circular exception"); | |||||
} | |||||
} | } |
@@ -170,7 +170,7 @@ public abstract class TaskdefsTest extends TestCase { | |||||
} | } | ||||
protected void expectSpecificBuildException(String taskname, String cause, String msg) { | protected void expectSpecificBuildException(String taskname, String cause, String msg) { | ||||
try { | |||||
try { | |||||
executeTarget(taskname); | executeTarget(taskname); | ||||
} catch (org.apache.tools.ant.BuildException ex) { | } catch (org.apache.tools.ant.BuildException ex) { | ||||
if ((null != msg) && (ex.getMessage() != msg)) { | if ((null != msg) && (ex.getMessage() != msg)) { | ||||