blob: abb97c0a386ce8ecb2339fa028045e08eb59d7c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package test;
import java.util.ArrayList;
import java.util.List;
import org.testng.Assert;
import org.testng.annotations.Test;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
public class QuotedMainTest {
@Parameter
List<String> args = new ArrayList<String>();
String quoted = "\" \"";
@Test
public void testMain() {
JCommander jc = new JCommander(this);
jc.parse(quoted);
Assert.assertEquals(args.size(), 1);
Assert.assertEquals(args.get(0), " ");
}
public static void main(String[] args) {
new QuotedMainTest().testMain();
}
}
|