Author: dennisl
Date: Sat Mar 15 07:04:09 2008
New Revision: 637412

URL: http://svn.apache.org/viewvc?rev=637412&view=rev
Log:
o Add tests between files for getRelativePath(...).

Modified:
    
maven/shared/trunk/maven-doxia-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java

Modified: 
maven/shared/trunk/maven-doxia-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
URL: 
http://svn.apache.org/viewvc/maven/shared/trunk/maven-doxia-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java?rev=637412&r1=637411&r2=637412&view=diff
==============================================================================
--- 
maven/shared/trunk/maven-doxia-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
 (original)
+++ 
maven/shared/trunk/maven-doxia-tools/src/test/java/org/apache/maven/doxia/tools/SiteToolTest.java
 Sat Mar 15 07:04:09 2008
@@ -152,6 +152,20 @@
         to = "http://maven.apache.org/plugins/maven-site-plugin";;
         from = "http://maven.apache.org/";;
         assertEquals( tool.getRelativePath( to, from ), "plugins" + 
File.separator + "maven-site-plugin" );
+
+        // Tests between files as described in MIDEA-102
+        to = "C:/dev/voca/gateway/parser/gateway-parser.iml";
+        from = "C:/dev/voca/gateway/";
+        assertEquals( "Child file using Windows drive letter",
+                      "parser" + File.separator + "gateway-parser.iml", 
tool.getRelativePath( to, from ) );
+        to = "C:/foo/child";
+        from = "C:/foo/master";
+        assertEquals( "Sibling directory using Windows drive letter",
+                      ".." + File.separator + "child", tool.getRelativePath( 
to, from ) );
+        to = "/myproject/myproject-module1";
+        from = "/myproject/myproject";
+        assertEquals( "Sibling directory with similar name",
+                      ".." + File.separator + "myproject-module1", 
tool.getRelativePath( to, from ) );
     }
 
     /**


Reply via email to