Normalize file separators.

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@679092 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2008-07-23 14:19:05 +00:00
parent 86b16396c2
commit abf2c4cbdd
1 changed files with 8 additions and 3 deletions

View File

@ -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 );
}
}