Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-02-29 22:03:38 +0000
committerMatthias Sohn2016-03-01 09:21:13 +0000
commitec367f9865d38aa4fe56d27de473db85d1172d71 (patch)
treee813a8b073e986adf810315f712af86816e37bee
parent04b5ae86a4dacfecdd86d7d92c697695fcedfe7b (diff)
downloadegit-ec367f9865d38aa4fe56d27de473db85d1172d71.tar.gz
egit-ec367f9865d38aa4fe56d27de473db85d1172d71.tar.xz
egit-ec367f9865d38aa4fe56d27de473db85d1172d71.zip
Fix bug in RepositoryMappingTest
Minor mixup between OS and portable strings went unnoticed on Unixlike systems and would fail on Windows. Change-Id: I21175bbaacde4793065c08f157cc3467b17adfcd Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.core.test/src/org/eclipse/egit/core/project/RepositoryMappingTest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/project/RepositoryMappingTest.java b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/project/RepositoryMappingTest.java
index 0d22fdfc57..3bf8e7924c 100644
--- a/org.eclipse.egit.core.test/src/org/eclipse/egit/core/project/RepositoryMappingTest.java
+++ b/org.eclipse.egit.core.test/src/org/eclipse/egit/core/project/RepositoryMappingTest.java
@@ -137,7 +137,7 @@ public class RepositoryMappingTest extends GitTestCase {
// component.
String gitAbsolute = projectPath.uptoSegment(0)
.append(projectPath.segment(0) + "fake").append(".git")
- .toOSString();
+ .toPortableString();
String parents = "";
while (projectPath.segmentCount() > 2) {
String pathString = projectPath.toOSString();
@@ -151,16 +151,16 @@ public class RepositoryMappingTest extends GitTestCase {
}
}
- private void assertRepoMappingPath(IProject testProject, String path,
- String testDir, String parents) {
- String testDirOS = testDir.replace('/', File.separatorChar);
+ private void assertRepoMappingPath(IProject testProject, String pathOS,
+ String testDirPortable, String parentsPortable) {
+ String testDirOS = testDirPortable.replace('/', File.separatorChar);
File testFile = new File(testDirOS);
if (!testFile.isAbsolute()) {
- testFile = new File(new File(path), testDirOS);
+ testFile = new File(new File(pathOS), testDirOS);
}
RepositoryMapping mapping = RepositoryMapping.create(testProject,
testFile);
- assertEquals(parents + testDir,
+ assertEquals(parentsPortable + testDirPortable,
mapping.getGitDirPath().toPortableString());
}

Back to the top