You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2011/08/01 15:40:38 UTC
svn commit: r1152772 -
/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3951AbsolutePathsTest.java
Author: brett
Date: Mon Aug 1 13:40:37 2011
New Revision: 1152772
URL: http://svn.apache.org/viewvc?rev=1152772&view=rev
Log:
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()
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3951AbsolutePathsTest.java
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3951AbsolutePathsTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3951AbsolutePathsTest.java?rev=1152772&r1=1152771&r2=1152772&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3951AbsolutePathsTest.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3951AbsolutePathsTest.java Mon Aug 1 13:40:37 2011
@@ -69,10 +69,11 @@ public class MavenITmng3951AbsolutePaths
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" ) ) );
}