Browse Source

Fix some testcases.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268416 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
113e9e7644
3 changed files with 10 additions and 9 deletions
  1. +2
    -2
      WHATSNEW
  2. +4
    -4
      src/etc/testcases/taskdefs/available.xml
  3. +4
    -3
      src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java

+ 2
- 2
WHATSNEW View File

@@ -90,8 +90,8 @@ Fixed bugs:
* nested <classpath> elements of <taskdef> now work for <taskdef>s not
nested into <target> as well.

* <property> and <available> will search for the resource /foo instead
of /org/apache/tools/ant/taskdefs/foo when given a relative resource
* <property> and <available> will search for the resource "foo" instead
of "/org/apache/tools/ant/taskdefs/foo" when given a relative resource
name foo.

Changes from Ant 1.1 to Ant 1.2


+ 4
- 4
src/etc/testcases/taskdefs/available.xml View File

@@ -26,12 +26,12 @@

<target name="test6">
<available property="test"
resource="/org/apache/tools/ant/taskdefs/this_resource_does_not_exist"/>
resource="org/apache/tools/ant/taskdefs/this_resource_does_not_exist"/>
</target>

<target name="test7">
<available property="test"
resource="/org/apache/tools/ant/taskdefs/defaults.properties"/>
resource="org/apache/tools/ant/taskdefs/defaults.properties"/>
</target>

<target name="test8">
@@ -47,14 +47,14 @@
<target name="test10">
<available property="test"
file="available.xml"
resource="/org/apache/tools/ant/taskdefs/defaults.properties"
resource="org/apache/tools/ant/taskdefs/defaults.properties"
classname="org.apache.tools.ant.taskdefs.Ant"/>
</target>
<target name="test11">
<available property="test"
file="src/etc/testcases/taskdefs/available.xml"
resource="/org/apache/tools/ant/taskdefs/defaults.properties"
resource="org/apache/tools/ant/taskdefs/defaults.properties"
classname="org.apache.tools.ant.taskdefs.this_class_does_not_exist"/>
</target>


+ 4
- 3
src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java View File

@@ -64,7 +64,7 @@ import java.io.File;
/**
* JUnit 3 testcases for org.apache.tools.ant.CommandlineJava
*
* @author Stefan Bodewig <a href="mailto:stefan.bodewig@megabit.net">stefan.bodewig@megabit.net</a>
* @author <a href="mailto:stefan.bodewig@epost.de">Stefan Bodewig</a>
*/
public class CommandlineJavaTest extends TestCase {

@@ -77,6 +77,7 @@ public class CommandlineJavaTest extends TestCase {
public void setUp() {
project = new Project();
project.setBasedir(".");
project.setProperty("build.sysclasspath", "ignore");
}

public void testGetCommandline() {
@@ -92,8 +93,8 @@ public class CommandlineJavaTest extends TestCase {
assertEquals("no classpath",
"org.apache.tools.ant.CommandlineJavaTest", s[3]);

c.createClasspath(project).setLocation(new File("junit.jar"));
c.createClasspath(project).setLocation(new File("ant.jar"));
c.createClasspath(project).setLocation(project.resolveFile("lib/core/junit.jar"));
c.createClasspath(project).setLocation(project.resolveFile("lib/ant.jar"));
s = c.getCommandline();
assertEquals("with classpath", 6, s.length);
assertEquals("with classpath", "java", s[0]);


Loading…
Cancel
Save