diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-07-29 18:31:39 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2012-07-29 18:31:39 -0400 |
commit | 0ec1db820d298a351c470b78b05a8968fd85b1e1 (patch) | |
tree | d2520db0f4d9a918441bd228b23af97a823fa0ef /org.eclipse.jgit.test | |
parent | 958a517c867364134f329c8ff7be4f6c949d5117 (diff) | |
parent | beee7b86afd5d4e1e9185c1f81640b83d74398f3 (diff) | |
download | jgit-0ec1db820d298a351c470b78b05a8968fd85b1e1.tar.gz jgit-0ec1db820d298a351c470b78b05a8968fd85b1e1.zip |
Merge "Fix resolving of relative file URIs in TransportLocal"
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java index 9899d14d8d..4e7b5e420e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java @@ -58,6 +58,7 @@ import java.util.List; import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.SampleDataRepositoryTestCase; +import org.eclipse.jgit.storage.file.FileRepository; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -214,6 +215,18 @@ public class TransportTest extends SampleDataRepositoryTestCase { } @Test + public void testLocalTransportWithRelativePath() throws Exception { + FileRepository other = createWorkRepository(); + String otherDir = other.getWorkTree().getName(); + + RemoteConfig config = new RemoteConfig(db.getConfig(), "other"); + config.addURI(new URIish("../" + otherDir)); + + // Should not throw NoRemoteRepositoryException + transport = Transport.open(db, config); + } + + @Test public void testSpi() { List<TransportProtocol> protocols = Transport.getTransportProtocols(); assertNotNull(protocols); |