|
@@ -24,9 +24,11 @@ package com.dmdirc.util;
|
24
|
24
|
import java.util.Arrays;
|
25
|
25
|
|
26
|
26
|
import org.junit.Test;
|
|
27
|
+
|
27
|
28
|
import static org.junit.Assert.*;
|
28
|
29
|
|
29
|
30
|
public class CommandUtilsTest {
|
|
31
|
+
|
30
|
32
|
@Test
|
31
|
33
|
public void testParseArguments() {
|
32
|
34
|
final String[][][] tests = new String[][][]{
|
|
@@ -36,7 +38,7 @@ public class CommandUtilsTest {
|
36
|
38
|
{{"abcdef \"abcdef\" \"abcdef\""}, {"abcdef", "abcdef", "abcdef"}},
|
37
|
39
|
{{"abcdef \"\""}, {"abcdef", ""}},
|
38
|
40
|
{{"abcdef \" foo?\""}, {"abcdef", " foo?"}},
|
39
|
|
- };
|
|
41
|
+ {{"abcdef \" foo? bar\""}, {"abcdef", " foo? bar"}},};
|
40
|
42
|
|
41
|
43
|
for (String[][] test : tests) {
|
42
|
44
|
final String[] res = CommandUtils.parseArguments(test[0][0]);
|