diff options
author | RĂ¼diger Herrmann <ruediger.herrmann@gmx.de> | 2016-05-21 15:19:24 +0200 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2016-10-23 15:29:17 +0900 |
commit | a5eccf4a4d25534da73d39416454ab243531865a (patch) | |
tree | df0b8b8ea8c3ef6d70c3c2e4e98b4acb226f44aa /org.eclipse.jgit.pgm.test/tst | |
parent | 03046d0f60810ec01d830e6efb3291e4a161512a (diff) | |
download | jgit-a5eccf4a4d25534da73d39416454ab243531865a.tar.gz jgit-a5eccf4a4d25534da73d39416454ab243531865a.zip |
Preserve backslashes within double quotes in CLIGitCommand::split()
Change-Id: Ia6a56512baa6a0f27e2eef1b19ebb60291ba377f
Signed-off-by: RĂ¼diger Herrmann <ruediger.herrmann@gmx.de>
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst')
-rw-r--r-- | org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CLIGitCommandTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CLIGitCommandTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CLIGitCommandTest.java index 24788a47bd..58d8e0349f 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CLIGitCommandTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CLIGitCommandTest.java @@ -51,9 +51,11 @@ public class CLIGitCommandTest { @Test public void testSplit() throws Exception { + assertArrayEquals(new String[0], split("")); assertArrayEquals(new String[] { "a" }, split("a")); assertArrayEquals(new String[] { "a", "b" }, split("a b")); assertArrayEquals(new String[] { "a", "b c" }, split("a 'b c'")); assertArrayEquals(new String[] { "a", "b c" }, split("a \"b c\"")); + assertArrayEquals(new String[] { "a", "b\\c" }, split("a \"b\\c\"")); } } |