commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r611290 - in /commons/proper/lang/trunk/src: java/org/apache/commons/lang/StringUtils.java test/org/apache/commons/lang/StringUtilsTest.java
Date Fri, 11 Jan 2008 20:26:03 GMT
Author: mbenson
Date: Fri Jan 11 12:26:02 2008
New Revision: 611290

URL: http://svn.apache.org/viewvc?rev=611290&view=rev
Log:
add'l splitByCharacterType tests for single trailing characters

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
    commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java?rev=611290&r1=611289&r2=611290&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/StringUtils.java Fri Jan 11
12:26:02 2008
@@ -2617,6 +2617,7 @@
      * StringUtils.splitByCamelCase("ab de fg")   = ["ab", " ", "de", " ", "fg"]
      * StringUtils.splitByCamelCase("ab   de fg") = ["ab", "   ", "de", " ", "fg"]
      * StringUtils.splitByCamelCase("ab:cd:ef")   = ["ab", ":", "cd", ":", "ef"]
+     * StringUtils.splitByCamelCase("number5")   = ["number", "5"]
      * StringUtils.splitByCamelCase("fooBar")     = ["foo", "B", "ar"]
      * StringUtils.splitByCamelCase("foo200Bar")  = ["foo", "200", "B", "ar"]
      * StringUtils.splitByCamelCase("ASFRules")   = ["ASFR", "ules"]
@@ -2644,6 +2645,7 @@
      * StringUtils.splitByCamelCase("ab de fg")   = ["ab", " ", "de", " ", "fg"]
      * StringUtils.splitByCamelCase("ab   de fg") = ["ab", "   ", "de", " ", "fg"]
      * StringUtils.splitByCamelCase("ab:cd:ef")   = ["ab", ":", "cd", ":", "ef"]
+     * StringUtils.splitByCamelCase("number5")   = ["number", "5"]
      * StringUtils.splitByCamelCase("fooBar")     = ["foo", "Bar"]
      * StringUtils.splitByCamelCase("foo200Bar")  = ["foo", "200", "Bar"]
      * StringUtils.splitByCamelCase("ASFRules")   = ["ASF", "Rules"]

Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java?rev=611290&r1=611289&r2=611290&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java (original)
+++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/StringUtilsTest.java Fri Jan
11 12:26:02 2008
@@ -873,6 +873,12 @@
 
         assertTrue(ArrayUtils.isEquals(new String[] { "ab", ":", "cd", ":",
                 "ef" }, StringUtils.splitByCharacterType("ab:cd:ef", camelCase)));
+        
+        assertTrue(ArrayUtils.isEquals(new String[] { "number", "5" },
+                StringUtils.splitByCharacterType("number5")));
+        
+        assertTrue(ArrayUtils.isEquals(new String[] { "number", "5" },
+                StringUtils.splitByCharacterType("number5", camelCase)));
 
         assertTrue(ArrayUtils.isEquals(new String[] { "foo", "B", "ar" },
                 StringUtils.splitByCharacterType("fooBar")));
@@ -891,7 +897,6 @@
 
         assertTrue(ArrayUtils.isEquals(new String[] { "ASF", "Rules" },
                 StringUtils.splitByCharacterType("ASFRules", camelCase)));
-
     }
 
     public void testDeprecatedDeleteSpace_String() {



Mime
View raw message