Skip to content

Commit ae2ff1d

Browse files
committed
Merged BugCLI51Test into ParserTestCase
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/branches/cli-1.x@695672 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6728974 commit ae2ff1d

2 files changed

Lines changed: 8 additions & 51 deletions

File tree

src/test/org/apache/commons/cli/ParserTestCase.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@ public void testNegativeArgument() throws Exception
227227
assertEquals("-1", cl.getOptionValue("b"));
228228
}
229229

230+
public void testArgumentStartingWithHyphen() throws Exception
231+
{
232+
String[] args = new String[]{"-b", "-foo"};
233+
234+
CommandLine cl = parser.parse(options, args);
235+
assertEquals("-foo", cl.getOptionValue("b"));
236+
}
237+
230238
public void testShortWithEqual() throws Exception
231239
{
232240
String[] args = new String[] { "-f=bar" };

src/test/org/apache/commons/cli/bug/BugCLI51Test.java

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)