org.apache.tools.ant classes must live on the system classloader to be loaded. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269892 13f79535-47bb-0310-9956-ffa450edef68master
@@ -737,6 +737,7 @@ | |||||
<batchtest> | <batchtest> | ||||
<fileset dir="${tests.dir}"> | <fileset dir="${tests.dir}"> | ||||
<exclude name="org/example/**" /> | |||||
<include name="**/*Test*" /> | <include name="**/*Test*" /> | ||||
<!-- abstract class, not a testcase --> | <!-- abstract class, not a testcase --> | ||||
<exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" /> | <exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" /> | ||||
@@ -2,6 +2,11 @@ | |||||
<project name="xxx-test" basedir="." default="test1"> | <project name="xxx-test" basedir="." default="test1"> | ||||
<path id="testclasses"> | |||||
<pathelement location="../../../../build/testcases" /> | |||||
<pathelement path="${java.class.path}" /> | |||||
</path> | |||||
<target name="test1"> | <target name="test1"> | ||||
<taskdef/> | <taskdef/> | ||||
</target> | </target> | ||||
@@ -27,9 +32,10 @@ | |||||
</target> | </target> | ||||
<target name="test6"> | <target name="test6"> | ||||
<echo message="${build.test}" /> | |||||
<taskdef name="test6" | <taskdef name="test6" | ||||
classname="org.apache.tools.ant.taskdefs.TaskdefTestSimpleTask" /> | |||||
classname="org.example.tasks.TaskdefTestSimpleTask"> | |||||
<classpath refid="testclasses" /> | |||||
</taskdef> | |||||
<test6> | <test6> | ||||
<echo message="worked" /> | <echo message="worked" /> | ||||
</test6> | </test6> | ||||
@@ -37,7 +43,9 @@ | |||||
<target name="test7"> | <target name="test7"> | ||||
<taskdef name="test7" | <taskdef name="test7" | ||||
classname="org.apache.tools.ant.taskdefs.TaskdefTestContainerTask" /> | |||||
classname="org.example.tasks.TaskdefTestContainerTask"> | |||||
<classpath refid="testclasses" /> | |||||
</taskdef> | |||||
<test7> | <test7> | ||||
<echo message="worked" /> | <echo message="worked" /> | ||||
</test7> | </test7> | ||||
@@ -93,13 +93,11 @@ public class TaskdefTest extends TaskdefsTest { | |||||
executeTarget("test5a"); | executeTarget("test5a"); | ||||
} | } | ||||
/* disabled until I know why they fail when run via the junit task --SB | |||||
public void test6() { | public void test6() { | ||||
expectOutput("test6", "simpletask: worked"); | |||||
expectLog("test6", "simpletask: worked"); | |||||
} | } | ||||
public void test7() { | public void test7() { | ||||
expectOutput("test7", "worked"); | |||||
expectLog("test7", "worked"); | |||||
} | } | ||||
*/ | |||||
} | } |
@@ -52,7 +52,9 @@ | |||||
* <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
*/ | */ | ||||
package org.apache.tools.ant.taskdefs; | |||||
package org.example.tasks; | |||||
import org.apache.tools.ant.taskdefs.Sequential; | |||||
public class TaskdefTestContainerTask extends Sequential { | public class TaskdefTestContainerTask extends Sequential { | ||||
public TaskdefTestContainerTask() {} | public TaskdefTestContainerTask() {} |
@@ -52,7 +52,7 @@ | |||||
* <http://www.apache.org/>. | * <http://www.apache.org/>. | ||||
*/ | */ | ||||
package org.apache.tools.ant.taskdefs; | |||||
package org.example.tasks; | |||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; |