File tree Expand file tree Collapse file tree
src/test/org/apache/commons/cli Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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.13 2003/01/13 08:17:26 jkeyes Exp $
8+ * $Id: BugsTest.java,v 1.14 2003/01/16 21:37:10 jkeyes Exp $
99 */
1010
1111package org .apache .commons .cli ;
@@ -344,7 +344,7 @@ public void test13935() {
344344 }
345345 }
346346
347- public void test14786 () {
347+ public void test14786 () throws Exception {
348348 Option o = OptionBuilder .isRequired ().withDescription ("test" ).create ("test" );
349349 Options opts = new Options ();
350350 opts .addOption (o );
@@ -353,12 +353,9 @@ public void test14786() {
353353 CommandLineParser parser = new GnuParser ();
354354
355355 String [] args = new String [] { "-test" };
356- try {
357- CommandLine line = parser .parse ( opts , args );
358- }
359- catch ( ParseException exp ) {
360- fail ( "Unexpected exception:" + exp .getMessage () );
361- }
356+
357+ CommandLine line = parser .parse ( opts , args );
358+ assertTrue ( line .hasOption ( "test" ) );
362359 }
363360
364361 public void test15046 () throws Exception {
You can’t perform that action at this time.
0 commit comments