You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/07/23 16:19:06 UTC

svn commit: r679092 - /maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java

Author: jdcasey
Date: Wed Jul 23 07:19:05 2008
New Revision: 679092

URL: http://svn.apache.org/viewvc?rev=679092&view=rev
Log:
Normalize file separators.

Modified:
    maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java

Modified: maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java?rev=679092&r1=679091&r2=679092&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java (original)
+++ maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java Wed Jul 23 07:19:05 2008
@@ -30,7 +30,7 @@
 
         File projectBuildDirectory = new File( basedir, "target" );
 
-        assertEquals( projectBuildDirectory.getAbsolutePath(), testProperties.getProperty( "project.build.directory" ) );
+        assertEquals( normalize( projectBuildDirectory.getAbsolutePath() ), normalize( testProperties.getProperty( "project.build.directory" ) ) );
     }
 
     public void testProjectBuildDirectoryForMojoExecution()
@@ -46,8 +46,13 @@
 
         File projectBuildDirectory = new File( basedir, "target" );
 
-        assertEquals( projectBuildDirectory.getAbsolutePath(), testProperties.getProperty( "project.build.directory" ) );
-        assertEquals( projectBuildDirectory.getAbsolutePath(), testProperties.getProperty( "targetDirectoryFile" ) );
+        assertEquals( normalize( projectBuildDirectory.getAbsolutePath() ), normalize( testProperties.getProperty( "project.build.directory" ) ) );
+        assertEquals( normalize( projectBuildDirectory.getAbsolutePath() ), normalized( testProperties.getProperty( "targetDirectoryFile" ) ) );
         assertEquals( "target", testProperties.getProperty( "targetDirectoryString" ) );
     }
+
+    private String normalize( String src )
+    {
+	    return src.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
+    }
 }