Browse Source

Adapt testcase to changes in CommandlineJava.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269358 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
64988531ab
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java

+ 9
- 2
src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java View File

@@ -87,7 +87,14 @@ public class CommandlineJavaTest extends TestCase {
c.createVmArgument().setValue("-Djava.compiler=NONE");
String[] s = c.getCommandline();
assertEquals("no classpath", 4, s.length);
assertEquals("no classpath", "java", s[0]);
/*
* After changing CommandlineJava to search for the java
* executable, I don't know, how to tests the value returned
* here without using the same logic as applied in the class
* itself.
*
* assert("no classpath", "java", s[0]);
*/
assertEquals("no classpath", "-Djava.compiler=NONE", s[1]);
assertEquals("no classpath", "junit.textui.TestRunner", s[2]);
assertEquals("no classpath",
@@ -102,7 +109,7 @@ public class CommandlineJavaTest extends TestCase {
c.createClasspath(project).setLocation(project.resolveFile("bootstrap/lib/ant.jar"));
s = c.getCommandline();
assertEquals("with classpath", 6, s.length);
assertEquals("with classpath", "java", s[0]);
// assertEquals("with classpath", "java", s[0]);
assertEquals("with classpath", "-Djava.compiler=NONE", s[1]);
assertEquals("with classpath", "-classpath", s[2]);
assert("junit.jar contained",


Loading…
Cancel
Save