Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-08-25 16:11:14 +0000
committerMichael Valenta2004-08-25 16:11:14 +0000
commite07c129baf03db3a661990d147765a3bd85477ab (patch)
tree362b0ba9ee8c82f429da973035d978d186667aa6 /tests/org.eclipse.team.tests.cvs.core
parent42d7813bdf68ed0cc146bbbb51b3a1971f8a7073 (diff)
downloadeclipse.platform.team-e07c129baf03db3a661990d147765a3bd85477ab.tar.gz
eclipse.platform.team-e07c129baf03db3a661990d147765a3bd85477ab.tar.xz
eclipse.platform.team-e07c129baf03db3a661990d147765a3bd85477ab.zip
Bug 70439 CVS/Root Datei-Syntax nicht korrekt laut CVS Spec.
Diffstat (limited to 'tests/org.eclipse.team.tests.cvs.core')
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java
index 1e7d9ad4b..046b1531f 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/cvsresources/ResourceSyncInfoTest.java
@@ -16,6 +16,8 @@ import junit.framework.TestSuite;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.team.internal.ccvs.core.CVSException;
+import org.eclipse.team.internal.ccvs.core.connection.CVSRepositoryLocation;
+import org.eclipse.team.internal.ccvs.core.syncinfo.FolderSyncInfo;
import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
import org.eclipse.team.tests.ccvs.core.CVSTestSetup;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
@@ -180,4 +182,23 @@ public class ResourceSyncInfoTest extends EclipseTest {
assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo4.getBytes(), syncInfo5.getBytes()));
assertTrue( ! ResourceSyncInfo.isLaterRevisionOnSameBranch(syncInfo5.getBytes(), syncInfo5.getBytes()));
}
+
+ public void testRepositoryLocationFormats() throws CVSException {
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user@host:/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user:password@host:/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:host:/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user@host:1234/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user:password@host:1234/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:host:1234/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user@host/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:user:password@host/home/path"), "/home/path");
+ assertPathCorrect(CVSRepositoryLocation.fromString(":pserver:host/home/path"), "/home/path");
+ }
+
+ private void assertPathCorrect(CVSRepositoryLocation location, String string) throws CVSException {
+ assertEquals(location.getRootDirectory(), string);
+ FolderSyncInfo info = new FolderSyncInfo("childPath", location.getLocation(), null, false);
+ assertEquals(info.getRemoteLocation(), string + '/' + "childPath");
+
+ }
}

Back to the top