(Merged from 383024.) Added unit test for case where parent path is empty and child adjustment contains .. at beginning.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@383027 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2006-03-04 04:28:03 +00:00
parent c8795b658b
commit a693217497
1 changed files with 14 additions and 0 deletions

View File

@ -48,6 +48,20 @@ public class DefaultModelInheritanceAssemblerTest
{
private ModelInheritanceAssembler assembler = new DefaultModelInheritanceAssembler();
public void testShouldAppendChildPathAdjustmentWithNoChildPartAndNoParentPart()
{
String parentPath = "";
String childPath = null;
String pathAdjustment = "../file-management";
String result =
( (DefaultModelInheritanceAssembler) assembler ).appendPath( parentPath, childPath, pathAdjustment, true );
System.out.println( "Resulting path is: \'" + result + "\'" );
assertEquals( "Append with path adjustment failed.", "/file-management", result );
}
public void testShouldAppendChildPathAdjustmentWithNoChildPart()
{
String parentPath = "http://maven.apache.org/shared/maven-shared-parent";