You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by fg...@apache.org on 2006/08/28 22:28:15 UTC

svn commit: r437815 - /maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java

Author: fgiust
Date: Mon Aug 28 13:28:14 2006
New Revision: 437815

URL: http://svn.apache.org/viewvc?rev=437815&view=rev
Log:
don't fail the test when the PATH environment variable is not set

Modified:
    maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java?rev=437815&r1=437814&r2=437815&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolatorTest.java Mon Aug 28 13:28:14 2006
@@ -179,7 +179,19 @@
 
         DependencySet outputSet = (DependencySet) outputDependencySets.get( 0 );
 
-        assertEquals( homeValue, outputSet.getOutputDirectory() );
+        // an environment variable named "PATH" may not exist on all systems.
+        // On Windows environment variables are not case sensitive and "PATH" can be named "Path"
+        // without this check the test will fail in such situation, but it's not a problem of the assembly plugin:
+        // make the test exit with success also if the interpolation of environment properties is not really tested,
+        // the plugin is anyway behaving as expected
+        if ( homeValue != null )
+        {
+            assertEquals( homeValue, outputSet.getOutputDirectory() );
+        }
+        else
+        {
+            assertEquals( "${env.PATH}", outputSet.getOutputDirectory() );
+        }
     }
 
     public void testShouldNotTouchUnresolvedExpression()