You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by jk...@apache.org on 2003/10/31 23:08:22 UTC
cvs commit: jakarta-commons-sandbox/cli/src/test/org/apache/commons/cli2/bugs Bug15046.java
jkeyes 2003/10/31 14:08:22
Modified: cli/src/test/org/apache/commons/cli2/bugs Bug15046.java
Log:
- removed TAB formatting
Revision Changes Path
1.2 +46 -46 jakarta-commons-sandbox/cli/src/test/org/apache/commons/cli2/bugs/Bug15046.java
Index: Bug15046.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/cli/src/test/org/apache/commons/cli2/bugs/Bug15046.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Bug15046.java 31 Oct 2003 00:20:08 -0000 1.1
+++ Bug15046.java 31 Oct 2003 22:08:22 -0000 1.2
@@ -12,52 +12,52 @@
public class Bug15046 extends TestCase {
- public Bug15046(String name) {
- super(name);
- }
-
- public void testParamNamedAsOption() throws Exception {
- final String[] CLI_ARGS = new String[] { "-z", "c" };
-
- DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
- ArgumentBuilder abuilder = new ArgumentBuilder();
-
- Option option =
- obuilder
- .withShortName("z")
- .withLongName("timezone")
- .withDescription("affected option")
- .withArgument(abuilder.withName("timezone").create())
- .create();
-
- GroupBuilder gbuilder = new GroupBuilder();
- Group options =
- gbuilder.withName("bug15046").withOption(option).create();
-
- CommandLineParser parser = new CommandLineParser();
- parser.setGroup(options);
- CommandLine line = parser.parse(CLI_ARGS);
-
- assertEquals("c", line.getValue("-z"));
-
- Option c =
- obuilder
- .withShortName("c")
- .withLongName("conflict")
- .withDescription("conflicting option")
- .withArgument(abuilder.withName("conflict").create())
- .create();
-
- options =
- gbuilder
- .withName("bug15046")
- .withOption(option)
- .withOption(c)
- .create();
+ public Bug15046(String name) {
+ super(name);
+ }
+
+ public void testParamNamedAsOption() throws Exception {
+ final String[] CLI_ARGS = new String[] { "-z", "c" };
+
+ DefaultOptionBuilder obuilder = new DefaultOptionBuilder();
+ ArgumentBuilder abuilder = new ArgumentBuilder();
+
+ Option option =
+ obuilder
+ .withShortName("z")
+ .withLongName("timezone")
+ .withDescription("affected option")
+ .withArgument(abuilder.withName("timezone").create())
+ .create();
+
+ GroupBuilder gbuilder = new GroupBuilder();
+ Group options =
+ gbuilder.withName("bug15046").withOption(option).create();
+
+ CommandLineParser parser = new CommandLineParser();
+ parser.setGroup(options);
+ CommandLine line = parser.parse(CLI_ARGS);
+
+ assertEquals("c", line.getValue("-z"));
+
+ Option c =
+ obuilder
+ .withShortName("c")
+ .withLongName("conflict")
+ .withDescription("conflicting option")
+ .withArgument(abuilder.withName("conflict").create())
+ .create();
+
+ options =
+ gbuilder
+ .withName("bug15046")
+ .withOption(option)
+ .withOption(c)
+ .create();
- parser.setGroup(options);
- line = parser.parse(CLI_ARGS);
+ parser.setGroup(options);
+ line = parser.parse(CLI_ARGS);
- assertEquals("c", line.getValue("-z"));
- }
+ assertEquals("c", line.getValue("-z"));
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org