jkeyes 2003/01/16 15:06:52
Modified: cli/src/test/org/apache/commons/cli BugsTest.java
Log:
added test for 15648, tested it on Mac OS X
Revision Changes Path
1.15 +11 -1
jakarta-commons/cli/src/test/org/apache/commons/cli/BugsTest.java
Index: BugsTest.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/cli/src/test/org/apache/commons/cli/BugsTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- BugsTest.java 16 Jan 2003 21:37:10 -0000 1.14
+++ BugsTest.java 16 Jan 2003 23:06:52 -0000 1.15
@@ -374,4 +374,14 @@
assertTrue( !line.hasOption("c") );
}
+ public void test15648() throws Exception {
+ CommandLineParser parser = new PosixParser();
+ final String[] args = new String[] { "-m", "\"Two Words\"" };
+ Option m = OptionBuilder.hasArgs().create("m");
+ Options options = new Options();
+ options.addOption( m );
+ CommandLine line = parser.parse( options, args );
+ assertEquals( "\"Two Words\"", line.getOptionValue( "m" ) );
+ }
+
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>