From abf2c4cbdd162bf3b95bd33371e5fcb59a65afdd Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Wed, 23 Jul 2008 14:19:05 +0000 Subject: [PATCH] Normalize file separators. git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@679092 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/maven/it0088/PomInterpolationTest.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/its/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java b/its/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java index 8e38533e08..2da1e111f5 100644 --- a/its/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java +++ b/its/core-integration-tests/src/test/resources/it0088/src/test/java/org/apache/maven/it0088/PomInterpolationTest.java @@ -30,7 +30,7 @@ public class PomInterpolationTest 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 @@ public class PomInterpolationTest 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 ); + } }