[jboss-cvs] container/src/tests/org/jboss/test/vfs ...

Scott Stark scott.stark at jboss.com
Fri Jul 14 19:18:28 EDT 2006


  User: starksm 
  Date: 06/07/14 19:18:28

  Modified:    src/tests/org/jboss/test/vfs  TestFileVFS.java
  Log:
  Test a non-canonical path
  
  Revision  Changes    Path
  1.8       +11 -2     container/src/tests/org/jboss/test/vfs/TestFileVFS.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TestFileVFS.java
  ===================================================================
  RCS file: /cvsroot/jboss/container/src/tests/org/jboss/test/vfs/TestFileVFS.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- TestFileVFS.java	14 Jul 2006 22:52:16 -0000	1.7
  +++ TestFileVFS.java	14 Jul 2006 23:18:28 -0000	1.8
  @@ -36,7 +36,7 @@
    * Tests of the VFS implementation
    * 
    * @author Scott.Stark at jboss.org
  - * @version $Revision: 1.7 $
  + * @version $Revision: 1.8 $
    */
   public class TestFileVFS extends BaseTestCase
   {
  @@ -153,6 +153,7 @@
         // Check resolving the root file
         VirtualFile root = vfs.resolveFile("");
         assertEquals("root name", "lib", root.getName());
  +      assertEquals("root path", "", root.getPathName());
         assertTrue("root isDirectory", root.isDirectory());
   
         // Find the outer.jar
  @@ -164,6 +165,14 @@
         VirtualFile outerJarMF = vfs.resolveFile("outer.jar/META-INF/MANIFEST.MF");
         assertNotNull("outer.jar/META-INF/MANIFEST.MF", outerJarMF);
         
  +      // Test a non-canonical path
  +      outerJarFile = new File("output/resources/../lib/outer.jar");
  +      rootURL = outerJarFile.getParentFile().toURL();
  +      // Check resolving the root file
  +      root = vfs.resolveFile("");
  +      assertEquals("root name", "lib", root.getName());
  +      assertEquals("root path", "", root.getPathName());
  +      assertTrue("root isDirectory", root.isDirectory());
      }
   
      /**
  
  
  



More information about the jboss-cvs-commits mailing list