maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r679092 - /maven/core-integration-testing/trunk/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java
Date Wed, 23 Jul 2008 14:19:06 GMT
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 );
+    }
 }



Mime
View raw message