aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport')
-rw-r--r--org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
index 82109582f5..93d85e2e90 100644
--- a/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
+++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java
@@ -572,4 +572,21 @@ public class OpenSshConfigTest extends RepositoryTestCase {
assertArrayEquals(new Object[] { "/foo", "/bar", "/baz" },
h.getConfig().getValues("IdentityFile"));
}
+
+ @Test
+ public void testWhitespace() throws Exception {
+ config("Host foo \tbar baz\nPort 29418\n");
+ Host h = osc.lookup("foo");
+ assertNotNull(h);
+ assertEquals(29418, h.getPort());
+ h = osc.lookup("bar");
+ assertNotNull(h);
+ assertEquals(29418, h.getPort());
+ h = osc.lookup("baz");
+ assertNotNull(h);
+ assertEquals(29418, h.getPort());
+ h = osc.lookup("\tbar");
+ assertNotNull(h);
+ assertEquals(22, h.getPort());
+ }
}