remove env var tests since the handling was removed. Note that the functionality needs to be re-enabled via the CLI: see MNG-2753

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@494704 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2007-01-10 04:32:43 +00:00
parent 9c95a9e5b5
commit bd608ed4cf
1 changed files with 0 additions and 38 deletions

View File

@ -200,44 +200,6 @@ public class RegexBasedModelInterpolatorTest
assertEquals( "file://localhost/myBasedir/temp-repo", ( (Repository) out.getRepositories().get( 0 ) ).getUrl() ); assertEquals( "file://localhost/myBasedir/temp-repo", ( (Repository) out.getRepositories().get( 0 ) ).getUrl() );
} }
public void testEnvars()
throws Exception
{
Properties envars = new Properties();
envars.setProperty( "HOME", "/path/to/home" );
Model model = new Model();
Properties modelProperties = new Properties();
modelProperties.setProperty( "outputDirectory", "${env.HOME}" );
model.setProperties( modelProperties );
Model out = new RegexBasedModelInterpolator( envars ).interpolate( model, context );
assertEquals( out.getProperties().getProperty( "outputDirectory" ), "/path/to/home" );
}
public void testEnvarExpressionThatEvaluatesToNullReturnsTheLiteralString()
throws Exception
{
Properties envars = new Properties();
Model model = new Model();
Properties modelProperties = new Properties();
modelProperties.setProperty( "outputDirectory", "${env.DOES_NOT_EXIST}" );
model.setProperties( modelProperties );
Model out = new RegexBasedModelInterpolator( envars ).interpolate( model, context );
assertEquals( out.getProperties().getProperty( "outputDirectory" ), "${env.DOES_NOT_EXIST}" );
}
public void testExpressionThatEvaluatesToNullReturnsTheLiteralString() public void testExpressionThatEvaluatesToNullReturnsTheLiteralString()
throws Exception throws Exception
{ {