You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2008/07/30 18:09:31 UTC
[jira] Updated: (CLI-161) PosixParser doesn't stop the parsing on
"--" tokens following an option with an argument
[ https://issues.apache.org/jira/browse/CLI-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Bourg updated CLI-161:
-------------------------------
Priority: Minor (was: Major)
Fix Version/s: (was: 1.2)
1.3
> PosixParser doesn't stop the parsing on "--" tokens following an option with an argument
> ----------------------------------------------------------------------------------------
>
> Key: CLI-161
> URL: https://issues.apache.org/jira/browse/CLI-161
> Project: Commons CLI
> Issue Type: Bug
> Components: Parser
> Affects Versions: 1.0
> Reporter: Emmanuel Bourg
> Priority: Minor
> Fix For: 1.3
>
>
> PosixParser doesn't stop on "--" tokens if the option preceding the token expects an argument. GnuParser is not affected by this issue.
> Test case:
> {code}
> public void testDoubleHyphenToken() throws Exception
> {
> Options options = new Options();
> options.addOption(OptionBuilder.hasArg().create('n'));
> options.addOption(OptionBuilder.create('m'));
> CommandLine cl = parser.parse(options, new String[] { "-n", "--", "-m" });
> assertTrue(cl.hasOption("n"));
> assertFalse(cl.hasOption("m"));
> }
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.