hlship 2003/10/21 08:13:46 Modified: hivemind/framework/src/test/hivemind/test/ant TestManifestClassPath.java Log: Fix bug in ManifestClassPath when the directory was also an entry on the classpath. Revision Changes Path 1.4 +32 -3 jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/ant/TestManifestClassPath.java Index: TestManifestClassPath.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/ant/TestManifestClassPath.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TestManifestClassPath.java 12 Oct 2003 09:54:35 -0000 1.3 +++ TestManifestClassPath.java 21 Oct 2003 15:13:46 -0000 1.4 @@ -153,6 +153,31 @@ _project.getProperty("output")); } + public void testDirectoryInClasspath() throws Exception + { + ManifestClassPath mcp = create(); + + mcp.setProperty("output"); + + File dir = new File("src").getAbsoluteFile(); + + mcp.setDirectory(dir); + + Path path = mcp.createClasspath(); + + Path.PathElement pe = path.createPathElement(); + + pe.setLocation(dir); + + pe = path.createPathElement(); + + pe.setLocation(new File("src/META-INF/hivemodule.xml")); + + mcp.execute(); + + assertEquals("META-INF/hivemodule.xml", _project.getProperty("output")); + } + public void testEmpty() throws Exception { ManifestClassPath mcp = create(); @@ -183,7 +208,9 @@ } catch (BuildException ex) { - assertExceptionSubstring(ex, "You must specify a property to assign the manifest classpath to"); + assertExceptionSubstring( + ex, + "You must specify a property to assign the manifest classpath to"); } } @@ -202,7 +229,9 @@ } catch (BuildException ex) { - assertExceptionSubstring(ex, "You must specify a classpath to generate the manifest entry from"); + assertExceptionSubstring( + ex, + "You must specify a classpath to generate the manifest entry from"); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]