File tree Expand file tree Collapse file tree
src/test/java/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ public void setUp() {
6060 //@formatter:on
6161 }
6262
63+ @ Test (expected = UnrecognizedOptionException .class )
64+ public void testAmbiguousArgParsing () throws Exception {
65+ final String [] args = {"-=-" };
66+ final Options options = new Options ();
67+
68+ final CommandLine cl = parser .parse (options , args );
69+ }
70+
6371 @ Test
6472 public void testAmbiguousLongWithoutEqualSingleDash () throws Exception {
6573 final String [] args = {"-b" , "-foobar" };
@@ -1021,12 +1029,4 @@ public void testWithRequiredOption() throws Exception {
10211029 assertEquals ("Confirm arg of -b" , "file" , cl .getOptionValue ("b" ));
10221030 assertTrue ("Confirm NO of extra args" , cl .getArgList ().isEmpty ());
10231031 }
1024-
1025- @ Test (expected = UnrecognizedOptionException .class )
1026- public void testAmbiguousArgParsing () throws Exception {
1027- final String [] args = {"-=-" };
1028- final Options options = new Options ();
1029-
1030- final CommandLine cl = parser .parse (options , args );
1031- }
10321032}
You can’t perform that action at this time.
0 commit comments