You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2005/02/18 16:53:56 UTC
DO NOT REPLY [Bug 33635] New: -
Wrong OptionCount at options with aliases
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33635>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33635
Summary: Wrong OptionCount at options with aliases
Product: Commons
Version: unspecified
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: normal
Priority: P2
Component: CLI
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: klaus.kopruch@materna.de
If you define
final Option help = obuilder
.withShortName("h")
.withShortName("help")
.withShortName("?")
.withDescription("print usage")
.create();
obuilder.reset();
and call
CommandLine line;
line = processCommandLine(new String[] {"-hy"});
assertEquals(new String[] {"-h"}, line);
then assertEquals(...);
public static void assertContentsEqual(final Collection expected, final
Collection found) {
assertTrue(expected.containsAll(found));
assertTrue(found.containsAll(expected));
assertEquals(expected.size(), found.size());
}
fails at the last line. If you do the same with
final Option help = obuilder
.withShortName("h")
.withDescription("print usage")
.create();
obuilder.reset();
then the test is green. If you retest with
final Option help = obuilder
.withShortName("h")
.withShortName("help")
.withDescription("print usage")
.create();
obuilder.reset();
the test again fails.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org