You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/03/14 11:00:20 UTC

svn commit: r637033 - /maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java

Author: bentmann
Date: Fri Mar 14 03:00:18 2008
New Revision: 637033

URL: http://svn.apache.org/viewvc?rev=637033&view=rev
Log:
o Made EclipsePluginTest.testProject10() pass on Windows

Modified:
    maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java

Modified: maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java?rev=637033&r1=637032&r2=637033&view=diff
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/test/java/org/apache/maven/plugin/eclipse/AbstractEclipsePluginTestCase.java Fri Mar 14 03:00:18 2008
@@ -504,6 +504,19 @@
                 continue;
             }
 
+            /*
+             * NOTE: This is to account for the unfortunate fact that "file:" URIs differ between Windows and Unix. On a
+             * Windows box, the path "C:\dir" is mapped to "file:/C:/dir". On a Unix box, the path "/home/dir" is mapped
+             * to "file:/home/dir". So, in the first case the slash after "file:" is not part of the corresponding
+             * filesystem path while in the later case it is. This discrepancy makes verifying the javadoc attachments
+             * in ".classpath" a little tricky.
+             */
+            if ( !expected.equals( actual ) )
+            {
+                // convert "file:C:/dir" to "file:/C:/dir"
+                expected = expected.replaceAll( "file:([a-zA-Z])", "file:/$1" );
+            }
+
             assertEquals( "Checking " + filename + ", line #" + ( i + 1 ), expected, actual );
         }