Browse Source

A small build test for <classloader>

I don't know how this can be included in the junit tests
( at least the part that loads optional tasks ) since the
test env already includes most classes.

In order to test - you need to run this without junit.jar
in ant/lib and to pass the path to junit.jar

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273686 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 22 years ago
parent
commit
f507f5134e
1 changed files with 23 additions and 0 deletions
  1. +23
    -0
      src/etc/testcases/taskdefs/classloader.xml

+ 23
- 0
src/etc/testcases/taskdefs/classloader.xml View File

@@ -0,0 +1,23 @@
<project name="classloader-test" default="main" basedir=".">

<target name="init">

<path id="myJars" >
<!-- both ant-junit.jar and junit.jar must be loaded from the same path -->
<pathelement path="${ant.home}/lib/ant-junit.jar" />
<pathelement path="${junit.jar}" />
</path>

<classloader pathRef="myJars"
reverse="true" >
</classloader>
<junit />
</target>

<target name="main" depends="init">
<echo message="Found JUNIT" />
</target>

</project>

Loading…
Cancel
Save