ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r799711 - /ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java
Date Fri, 31 Jul 2009 19:28:50 GMT
Author: jglick
Date: Fri Jul 31 19:28:49 2009
New Revision: 799711

URL: http://svn.apache.org/viewvc?rev=799711&view=rev
Log:
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.)

Modified:
    ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java

Modified: ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java?rev=799711&r1=799710&r2=799711&view=diff
==============================================================================
--- ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java (original)
+++ ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/AntTest.java Fri Jul 31 19:28:49
2009
@@ -313,7 +313,13 @@
 
     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 {



Mime
View raw message