Skip to content

Commit 326ac6d

Browse files
author
John Keyes
committed
added test for 15648, tested it on Mac OS X
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/cli/trunk@129873 13f79535-47bb-0310-9956-ffa450edef68
1 parent fc2253e commit 326ac6d

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* version 1.1, a copy of which has been included with this distribution in
66
* the LICENSE file.
77
*
8-
* $Id: BugsTest.java,v 1.14 2003/01/16 21:37:10 jkeyes Exp $
8+
* $Id: BugsTest.java,v 1.15 2003/01/16 23:06:52 jkeyes Exp $
99
*/
1010

1111
package org.apache.commons.cli;
@@ -374,4 +374,14 @@ public void test15046() throws Exception {
374374
assertTrue( !line.hasOption("c") );
375375
}
376376

377+
public void test15648() throws Exception {
378+
CommandLineParser parser = new PosixParser();
379+
final String[] args = new String[] { "-m", "\"Two Words\"" };
380+
Option m = OptionBuilder.hasArgs().create("m");
381+
Options options = new Options();
382+
options.addOption( m );
383+
CommandLine line = parser.parse( options, args );
384+
assertEquals( "\"Two Words\"", line.getOptionValue( "m" ) );
385+
}
386+
377387
}

0 commit comments

Comments
 (0)