Skip to content

Commit db90678

Browse files
author
John Keyes
committed
test for 13666 and 13780
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/cli/trunk@129826 13f79535-47bb-0310-9956-ffa450edef68
1 parent 43a3545 commit db90678

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

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

Lines changed: 17 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.8 2002/10/08 21:24:11 jkeyes Exp $
8+
* $Id: BugsTest.java,v 1.9 2002/10/19 21:18:26 jkeyes Exp $
99
*/
1010

1111
package org.apache.commons.cli;
@@ -262,4 +262,20 @@ public void test13425() {
262262
}
263263
fail( "MissingArgumentException not caught." );
264264
}
265+
266+
public void test13666() {
267+
Options options = new Options();
268+
Option dir = OptionBuilder.withDescription( "dir" )
269+
.hasArg()
270+
.create( 'd' );
271+
options.addOption( dir );
272+
try {
273+
HelpFormatter formatter = new HelpFormatter();
274+
formatter.printHelp( "dir", options );
275+
}
276+
catch( Exception exp ) {
277+
fail( "Unexpected Exception: " + exp.getMessage() );
278+
}
279+
}
280+
265281
}

0 commit comments

Comments
 (0)