Browse Source

Depending on exactly how you run 'ant test', its classpath could contain different things; legitimate for ${ant.core.lib} to be a classes dir.

(Would be better if the main build script actually ensured that it was testing the classes just compiled and controlled the test CP;
unless you do e.g. 'CLASSPATH=lib/optional/junit-3.8.2.jar ./bootstrap.sh test' it does not seem to work,
because '/usr/bin/ant test' actually runs tests against /usr/lib/ant.jar etc. Quite a mess.)

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@799711 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 16 years ago
parent
commit
091710e028
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java

+ 7
- 1
src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java View File

@@ -313,7 +313,13 @@ public class AntTest extends BuildFileTest {

public void testAntCoreLib() {
// Cf. #42263
expectLogContaining("sub-show-ant.core.lib", "ant.jar");
executeTarget("sub-show-ant.core.lib");
String realLog = getLog();
assertTrue("found ant.core.lib in: " + realLog,
// String.matches would be simpler... can we assume JDK 1.4+ yet?
realLog.indexOf("ant.jar") != -1 ||
realLog.indexOf("build/classes") != 1 ||
realLog.indexOf("build\\classes") != -1);
}

private class BasedirChecker implements BuildListener {


Loading…
Cancel
Save