mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 20:42:21 +00:00
[JENKINS-13649] Adding a test case
This commit is contained in:
1 parent
708b609ccc
commit
71debc2b89
1 file changed
+13
@@ -379,4 +379,17 @@ public class FilePathTest extends ChannelTestCase {
|
||||
tmp.deleteRecursive();
|
||||
}
|
||||
}
|
||||
|
||||
@Bug(13649)
|
||||
public void testMultiSegmentRelativePaths() throws Exception {
|
||||
FilePath winPath = new FilePath(new LocalChannel(null), "c:\\app\\jenkins\\workspace");
|
||||
FilePath nixPath = new FilePath(new LocalChannel(null), "/opt/jenkins/workspace");
|
||||
|
||||
assertEquals("c:\\app\\jenkins\\workspace\\foo\\bar\\manchu", new FilePath(winPath, "foo/bar/manchu").getRemote());
|
||||
assertEquals("c:\\app\\jenkins\\workspace\\foo\\bar\\manchu", new FilePath(winPath, "foo\\bar/manchu").getRemote());
|
||||
assertEquals("c:\\app\\jenkins\\workspace\\foo\\bar\\manchu", new FilePath(winPath, "foo\\bar\\manchu").getRemote());
|
||||
assertEquals("/opt/jenkins/workspace/foo/bar/manchu", new FilePath(nixPath, "foo\\bar\\manchu").getRemote());
|
||||
assertEquals("/opt/jenkins/workspace/foo/bar/manchu", new FilePath(nixPath, "foo/bar\\manchu").getRemote());
|
||||
assertEquals("/opt/jenkins/workspace/foo/bar/manchu", new FilePath(nixPath, "foo/bar/manchu").getRemote());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user