cvs commit: maven/src/test/java/org/apache/maven/util EnhancedStringTokenizerTest.java

2004-01-09 Thread bwalding
bwalding2004/01/09 06:35:08

  Modified:src/test/java/org/apache/maven/util
EnhancedStringTokenizerTest.java
  Log:
  Removed GPL.  I originally wrote this test case for another library (GPL at the 
time).
  When I copied it to Maven I intended that it become ASL licensed, but forgot to 
  fix the header.
  
  I thus relicense it to the Maven project under the ASL
  
  Revision  ChangesPath
  1.5   +56 -19
maven/src/test/java/org/apache/maven/util/EnhancedStringTokenizerTest.java
  
  Index: EnhancedStringTokenizerTest.java
  ===
  RCS file: 
/home/cvs/maven/src/test/java/org/apache/maven/util/EnhancedStringTokenizerTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- EnhancedStringTokenizerTest.java  19 Aug 2003 04:45:37 -  1.4
  +++ EnhancedStringTokenizerTest.java  9 Jan 2004 14:35:08 -   1.5
  @@ -1,23 +1,60 @@
  -/*
  - *  EnhancedStringTokenizer.java - Test file for EnhancedStringTokenizer
  - *   Copyright (C) 2001  Ben Walding
  - *
  - *  This program is free software; you can redistribute it and/or
  - *  modify it under the terms of the GNU General Public License
  - *  as published by the Free Software Foundation; either version 2
  - *  of the License, or (at your option) any later version.
  - *
  - *  This program is distributed in the hope that it will be useful,
  - *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  - *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  - *  GNU General Public License for more details.
  - *
  - *  You should have received a copy of the GNU General Public License
  - *  along with this program; if not, write to the Free Software
  - *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  - */
  -
   package org.apache.maven.util;
  +
  +/* 
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2003 The Apache Software Foundation.  All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
  + *notice, this list of conditions and the following disclaimer.
  + *
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *notice, this list of conditions and the following disclaimer in
  + *the documentation and/or other materials provided with the
  + *distribution.
  + *
  + * 3. The end-user documentation included with the redistribution,
  + *if any, must include the following acknowledgment:
  + *   "This product includes software developed by the
  + *Apache Software Foundation (http://www.apache.org/)."
  + *Alternately, this acknowledgment may appear in the software itself,
  + *if and wherever such third-party acknowledgments normally appear.
  + *
  + * 4. The names "Apache" and "Apache Software Foundation" and
  + *"Apache Maven" must not be used to endorse or promote products
  + *derived from this software without prior written permission. For
  + *written permission, please contact [EMAIL PROTECTED]
  + *
  + * 5. Products derived from this software may not be called "Apache",
  + *"Apache Maven", nor may "Apache" appear in their name, without
  + *prior written permission of the Apache Software Foundation.
  + *
  + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  + * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + * 
  + *
  + * This software consists of voluntary contributions made by many
  + * individuals on behalf of the Apache Software Foundation.  For more
  + * information on the Apache Software Foundation, please see
  + * .
  + *
  + * 
  + */
   
   import junit.framework.TestCase;
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTE

Re: cvs commit: maven/src/test/java/org/apache/maven/util EnhancedStringTokenizerTest.java

2004-01-08 Thread Ben Walding
Yeah, forgot to switch licenses.  That's my code, I wrote it. I'll 
change to ASL shortly.
(it comes from another library of mine)

[EMAIL PROTECTED] wrote:

Jason van Zyl <[EMAIL PROTECTED]> wrote on 08/01/2004 02:01:27 AM:

 

On Wed, 2004-01-07 at 09:56, [EMAIL PROTECTED] wrote:
   

dion2004/01/07 06:56:49

 Modified:src/test/java/org/apache/maven/util Tag: 
 

MAVEN-1_0-BRANCH
 

   EnhancedStringTokenizerTest.java
 Log:
 Code cleanup
 - Note: This class is GPL licensed!
 

Who put that in the repository?

It has to go immediately.
   

Ben apparently.

Maybe he can simply switch licenses, and forgot to.
--
dIon Gillard, Multitask Consulting
Blog:  http://blogs.codehaus.org/people/dion/




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cvs commit: maven/src/test/java/org/apache/maven/util EnhancedStringTokenizerTest.java

2004-01-07 Thread dion
Jason van Zyl <[EMAIL PROTECTED]> wrote on 08/01/2004 02:01:27 AM:

> On Wed, 2004-01-07 at 09:56, [EMAIL PROTECTED] wrote:
> > dion2004/01/07 06:56:49
> > 
> >   Modified:src/test/java/org/apache/maven/util Tag: 
MAVEN-1_0-BRANCH
> > EnhancedStringTokenizerTest.java
> >   Log:
> >   Code cleanup
> >   - Note: This class is GPL licensed!
> 
> Who put that in the repository?
> 
> It has to go immediately.
Ben apparently.

Maybe he can simply switch licenses, and forgot to.
--
dIon Gillard, Multitask Consulting
Blog:  http://blogs.codehaus.org/people/dion/





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: maven/src/test/java/org/apache/maven/util EnhancedStringTokenizerTest.java

2004-01-07 Thread Jason van Zyl
On Wed, 2004-01-07 at 09:56, [EMAIL PROTECTED] wrote:
> dion2004/01/07 06:56:49
> 
>   Modified:src/test/java/org/apache/maven/util Tag: MAVEN-1_0-BRANCH
> EnhancedStringTokenizerTest.java
>   Log:
>   Code cleanup
>   - Note: This class is GPL licensed!

Who put that in the repository?

It has to go immediately.

> -- 
> jvz.
> 
> Jason van Zyl
> [EMAIL PROTECTED]
> http://tambora.zenplex.org
> 
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
>   
>   -- Jacques Ellul, The Technological Society


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: maven/src/test/java/org/apache/maven/util EnhancedStringTokenizerTest.java

2004-01-07 Thread dion
dion2004/01/07 06:56:49

  Modified:src/test/java/org/apache/maven/util Tag: MAVEN-1_0-BRANCH
EnhancedStringTokenizerTest.java
  Log:
  Code cleanup
  - Note: This class is GPL licensed!
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.4.4.1   +23 -13
maven/src/test/java/org/apache/maven/util/EnhancedStringTokenizerTest.java
  
  Index: EnhancedStringTokenizerTest.java
  ===
  RCS file: 
/home/cvs/maven/src/test/java/org/apache/maven/util/EnhancedStringTokenizerTest.java,v
  retrieving revision 1.4
  retrieving revision 1.4.4.1
  diff -u -r1.4 -r1.4.4.1
  --- EnhancedStringTokenizerTest.java  19 Aug 2003 04:45:37 -  1.4
  +++ EnhancedStringTokenizerTest.java  7 Jan 2004 14:56:49 -   1.4.4.1
  @@ -21,19 +21,23 @@
   
   import junit.framework.TestCase;
   
  -
  -public class EnhancedStringTokenizerTest extends TestCase {
  -public EnhancedStringTokenizerTest(String name) {
  +public class EnhancedStringTokenizerTest extends TestCase
  +{
  +public EnhancedStringTokenizerTest(String name)
  +{
   super(name);
   }
   
  -protected void setUp() throws Exception {
  +protected void setUp() throws Exception
  +{
   }
   
  -protected void tearDown() throws Exception {
  +protected void tearDown() throws Exception
  +{
   }
   
  -public void testSimple() {
  +public void testSimple()
  +{
   EnhancedStringTokenizer tok = new 
EnhancedStringTokenizer("a,b,c,d,,e,,,f,g", ",");
   checkTokens(tok);
   }
  @@ -60,23 +64,28 @@
   assertEquals("tok.hasMoreTokens()", false, tok.hasMoreTokens());
   }
   
  -public void testSimpleTab() {
  -EnhancedStringTokenizer tok = new 
EnhancedStringTokenizer("a\tb\tc\td\t\te\t\t\tf\t\t\t\t\tg", "\t");
  +public void testSimpleTab()
  +{
  +EnhancedStringTokenizer tok =
  +new EnhancedStringTokenizer("a\tb\tc\td\t\te\t\t\tf\t\t\t\t\tg", "\t");
   checkTokens(tok);
   }
   
  -public void testNoDelim() {
  +public void testNoDelim()
  +{
   EnhancedStringTokenizer tok = new 
EnhancedStringTokenizer("a,b,c,d,,e,,,f,g", "\t");
   assertEquals("Token 1", "a,b,c,d,,e,,,f,g", tok.nextToken());
   assertEquals("tok.hasMoreTokens()", false, tok.hasMoreTokens());
   }
   
  -public void testNoText() {
  +public void testNoText()
  +{
   EnhancedStringTokenizer tok = new EnhancedStringTokenizer("", ",");
   assertEquals("tok.hasMoreTokens()", false, tok.hasMoreTokens());
   }
   
  -public void testReturnDelim() {
  +public void testReturnDelim()
  +{
   EnhancedStringTokenizer tok = new EnhancedStringTokenizer("a,b,,c,d", ",", 
true);
   assertEquals("Token 1", "a", tok.nextToken());
   assertEquals("Token 2", ",", tok.nextToken());
  @@ -90,7 +99,8 @@
   assertEquals("tok.hasMoreTokens()", false, tok.hasMoreTokens());
   }
   
  -public void testMultipleDelim() {
  +public void testMultipleDelim()
  +{
   EnhancedStringTokenizer tok = new EnhancedStringTokenizer("a.,b.,c.d", 
".,", true);
   assertEquals("Token 1", "a", tok.nextToken());
   assertEquals("Token 2", ".", tok.nextToken());
  @@ -106,4 +116,4 @@
   assertEquals("tok.hasMoreTokens()", false, tok.hasMoreTokens());
   }
   
  -}
  \ No newline at end of file
  +}
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: maven/src/test/java/org/apache/maven/util EnhancedStringTokenizerTest.java

2003-07-10 Thread dion
dion2003/07/10 23:51:13

  Modified:src/test/java/org/apache/maven/util
EnhancedStringTokenizerTest.java
  Log:
  Refactor duped check
  
  Revision  ChangesPath
  1.2   +9 -15 
maven/src/test/java/org/apache/maven/util/EnhancedStringTokenizerTest.java
  
  Index: EnhancedStringTokenizerTest.java
  ===
  RCS file: 
/home/cvs/maven/src/test/java/org/apache/maven/util/EnhancedStringTokenizerTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnhancedStringTokenizerTest.java  11 Apr 2003 18:42:53 -  1.1
  +++ EnhancedStringTokenizerTest.java  11 Jul 2003 06:51:13 -  1.2
  @@ -35,6 +35,14 @@
   
   public void testSimple() {
   EnhancedStringTokenizer tok = new 
EnhancedStringTokenizer("a,b,c,d,,e,,,f,g", ",");
  +checkTokens(tok);
  +}
  +
  +/**
  + * @param tok The tokenizer to check
  + */
  +private void checkTokens(EnhancedStringTokenizer tok)
  +{
   assertEquals("Token 1", "a", tok.nextToken());
   assertEquals("Token 2", "b", tok.nextToken());
   assertEquals("Token 3", "c", tok.nextToken());
  @@ -54,21 +62,7 @@
   
   public void testSimpleTab() {
   EnhancedStringTokenizer tok = new 
EnhancedStringTokenizer("a\tb\tc\td\t\te\t\t\tf\t\t\t\t\tg", "\t");
  -assertEquals("Token 1", "a", tok.nextToken());
  -assertEquals("Token 2", "b", tok.nextToken());
  -assertEquals("Token 3", "c", tok.nextToken());
  -assertEquals("Token 4", "d", tok.nextToken());
  -assertEquals("Token 5", "", tok.nextToken());
  -assertEquals("Token 6", "e", tok.nextToken());
  -assertEquals("Token 7", "", tok.nextToken());
  -assertEquals("Token 8", "", tok.nextToken());
  -assertEquals("Token 9", "f", tok.nextToken());
  -assertEquals("Token 10", "", tok.nextToken());
  -assertEquals("Token 11", "", tok.nextToken());
  -assertEquals("Token 12", "", tok.nextToken());
  -assertEquals("Token 13", "", tok.nextToken());
  -assertEquals("Token 14", "g", tok.nextToken());
  -assertEquals("tok.hasMoreTokens()", false, tok.hasMoreTokens());
  +checkTokens(tok);
   }
   
   public void testNoDelim() {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]