commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roxspr...@apache.org
Subject cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli PatternOptionBuilder.java
Date Fri, 26 Mar 2004 19:35:01 GMT
roxspring    2004/03/26 11:35:01

  Modified:    cli/src/test/org/apache/commons/cli BugsTest.java
               cli      project.xml
               cli/src/java/org/apache/commons/cli
                        PatternOptionBuilder.java
  Log:
  PatternOptionBuilder now supports required options
  
  PR:10890
  Submitted by:	Torsten Curdt
  Reviewed by:	Rob Oxspring
  
  Revision  Changes    Path
  1.17      +12 -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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BugsTest.java	17 Jan 2003 20:00:14 -0000	1.16
  +++ BugsTest.java	26 Mar 2004 19:35:01 -0000	1.17
  @@ -383,5 +383,16 @@
           CommandLine line = parser.parse( options, args );
           assertEquals( "Two Words", line.getOptionValue( "m" ) );
       }
  +    
  +    public void test27575() {
  +    	Options options = PatternOptionBuilder.parsePattern("hc!<");
  +    	assertNotNull(options);
  +    	Option h = options.getOption("-h");
  +    	assertNotNull(h);
  +    	assertFalse(h.isRequired());
  +    	Option c = options.getOption("-c");
  +    	assertNotNull(c);
  +    	assertTrue(c.isRequired());
  +    }
   
   }
  
  
  
  1.18      +1 -1      jakarta-commons/cli/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/project.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- project.xml	10 Feb 2004 19:15:04 -0000	1.17
  +++ project.xml	26 Mar 2004 19:35:01 -0000	1.18
  @@ -78,7 +78,7 @@
     
       <dependency>
         <id>junit</id>
  -      <version>3.7</version>
  +      <version>3.8.1</version>
       </dependency>
     
     </dependencies>
  
  
  
  1.8       +1 -1      jakarta-commons/cli/src/java/org/apache/commons/cli/PatternOptionBuilder.java
  
  Index: PatternOptionBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli/PatternOptionBuilder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PatternOptionBuilder.java	29 Feb 2004 16:30:03 -0000	1.7
  +++ PatternOptionBuilder.java	26 Mar 2004 19:35:01 -0000	1.8
  @@ -117,7 +117,7 @@
       {
           if ((ch != '@') && (ch != ':') && (ch != '%') && (ch !=
'+')
               && (ch != '#') && (ch != '<') && (ch != '>')
&& (ch != '*')
  -            && (ch != '/'))
  +            && (ch != '/') && (ch != '!'))
           {
               return false;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message