1 17 18 package org.apache.tools.ant.taskdefs; 19 20 import java.util.Vector ; 21 22 import org.apache.tools.ant.BuildFileTest; 23 import org.apache.tools.ant.Project; 24 import org.apache.tools.ant.util.JavaEnvUtils; 25 26 28 public class CallTargetTest extends BuildFileTest { 29 30 public CallTargetTest(String name) { 31 super(name); 32 } 33 34 public void setUp() { 35 configureProject("src/etc/testcases/taskdefs/calltarget.xml"); 36 } 37 38 public void testInheritRefFileSet() { 40 expectLogContaining("testinheritreffileset", "calltarget.xml"); 41 } 42 43 public void testInheritFilterset() { 45 project.executeTarget("testinheritreffilterset"); 46 } 47 48 public void testMultiCall() { 51 Vector v = new Vector (); 52 v.add("call-multi"); 53 v.add("call-multi"); 54 project.executeTargets(v); 55 assertLogContaining("multi is SETmulti is SET"); 56 } 57 58 public void testBlankTarget() { 59 expectBuildException("blank-target", "target name must not be empty"); 60 } 61 62 public void testMultipleTargets() { 63 expectLog("multiple-targets", "tadadctbdbtc"); 64 } 65 66 public void testMultipleTargets2() { 67 expectLog("multiple-targets-2", "dadctb"); 68 } 69 70 public void tearDown() { 71 project.executeTarget("cleanup"); 72 } 73 } 74 | Popular Tags |