You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Alexander Petrossian (PAF) (JIRA)" <ji...@apache.org> on 2015/06/22 16:10:01 UTC
[jira] [Created] (CLI-254) "test" gets parsed as test, quotes die
:-(
Alexander Petrossian (PAF) created CLI-254:
----------------------------------------------
Summary: "test" gets parsed as test, quotes die :-(
Key: CLI-254
URL: https://issues.apache.org/jira/browse/CLI-254
Project: Commons CLI
Issue Type: Bug
Affects Versions: 1.3
Reporter: Alexander Petrossian (PAF)
Fix For: 1.4
{code}
def cli = new CliBuilder()
cli.with {
f longOpt:'json-filter','jq expression', args: 1
}
def vals = ['test', 't"es"t',
"'test", "test'", "'test'",
'"test', 'test"', '"test"']
vals.each {
def opt = cli.parse(['-f', it])
assert opt.f == it
}
{code}
It fails on last entry: "test".
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)