only take the canonical file on the input path, so we resolve any symlinks (/private/tmp on Mac OS X for /tmp, and similar for storage location of some CI installs), without invalidating the test by modifying the paths either from the properties or from getRoot()

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@1152772 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2011-08-01 13:40:37 +00:00
parent 0134043e08
commit b32819ad12
1 changed files with 5 additions and 4 deletions

View File

@ -69,10 +69,11 @@ public class MavenITmng3951AbsolutePathsTest
verifier.assertFilePresent( "target/path.properties" );
Properties props = verifier.loadProperties( "target/path.properties" );
assertEquals( new File( testDir.getCanonicalFile(), "tmp" ).getAbsoluteFile(),
new File( props.getProperty( "fileParams.0" ) ) );
assertEquals( new File( getRoot( testDir ).getCanonicalFile(), "tmp" ).getCanonicalFile().getAbsoluteFile(),
new File( props.getProperty( "fileParams.1" ) ) );
testDir = testDir.getCanonicalFile();
assertEquals( new File( testDir, "tmp" ).getAbsoluteFile(), new File( props.getProperty( "fileParams.0" ) ) );
assertEquals( new File( getRoot( testDir ), "tmp" ).getAbsoluteFile(), new File( props.getProperty( "fileParams.1" ) ) );
assertEquals( new File( repoDir ), new File( props.getProperty( "stringParams.0" ) ) );
}