You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by hl...@apache.org on 2003/10/21 17:13:46 UTC

cvs commit: jakarta-commons-sandbox/hivemind/framework/src/test/hivemind/test/ant TestManifestClassPath.java

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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org