diff options
Diffstat (limited to 'archiva-base/archiva-common/src')
-rw-r--r-- | archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/PathUtilTest.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/PathUtilTest.java b/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/PathUtilTest.java index a66951511..f74e22114 100644 --- a/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/PathUtilTest.java +++ b/archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/PathUtilTest.java @@ -52,6 +52,11 @@ public class PathUtilTest workingDirname = workingDirname.substring( 0, workingDirname.length() - 2 ); } + if ( !workingDirname.startsWith( "/" ) ) + { + workingDirname = "/" + workingDirname; + } + String path = "path/to/resource.xml"; String expectedPath = "file:" + workingDirname + "/" + path; @@ -70,6 +75,11 @@ public class PathUtilTest workingDirname = workingDirname.substring( 0, workingDirname.length() - 2 ); } + if ( !workingDirname.startsWith( "/" ) ) + { + workingDirname = "/" + workingDirname; + } + String path = "path/to/resource.xml"; String expectedPath = "file:" + workingDirname + "/" + path; |