1
2
3
4
5
6
7
8
9
10 package org.eclipse.jgit.pgm;
11
12 import static org.eclipse.jgit.pgm.CLIGitCommand.split;
13 import static org.junit.Assert.assertArrayEquals;
14
15 import org.junit.Test;
16
17 public class CLIGitCommandTest {
18
19 @Test
20 public void testSplit() throws Exception {
21 assertArrayEquals(new String[0], split(""));
22 assertArrayEquals(new String[] { "a" }, split("a"));
23 assertArrayEquals(new String[] { "a", "b" }, split("a b"));
24 assertArrayEquals(new String[] { "a", "b c" }, split("a 'b c'"));
25 assertArrayEquals(new String[] { "a", "b c" }, split("a \"b c\""));
26 assertArrayEquals(new String[] { "a", "b\\c" }, split("a \"b\\c\""));
27 }
28 }