diff options
author | Andrey Loskutov <loskutov@gmx.de> | 2015-11-30 22:48:13 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2015-12-12 00:55:31 +0100 |
commit | 85d09a9ec7d599d0234efd53b924dc2767a3843b (patch) | |
tree | dd18b7d50aa9e4e75a0c616e2e71e09da322559c /org.eclipse.jgit.test | |
parent | e23521f0d9040d49dead2ce6fbfab6bde3b7b2c6 (diff) | |
download | jgit-85d09a9ec7d599d0234efd53b924dc2767a3843b.tar.gz jgit-85d09a9ec7d599d0234efd53b924dc2767a3843b.zip |
URIish: fixed full uri pattern not expecting end of line after host name
Bug: 483326
Change-Id: I8b6e3eb648c8ec2c38f73de22382537b1276b779
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java index 745c322013..76eb18afdf 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/URIishTest.java @@ -928,4 +928,19 @@ public class URIishTest { } } } + + @Test + public void testStringConstructor() throws Exception { + String str = "http://example.com/"; + URIish u = new URIish(str); + assertEquals("example.com", u.getHost()); + assertEquals("/", u.getPath()); + assertEquals(str, u.toString()); + + str = "http://example.com"; + u = new URIish(str); + assertEquals("example.com", u.getHost()); + assertEquals("", u.getPath()); + assertEquals(str, u.toString()); + } } |