Test showing that new String {"-"} does not work in CharSetUtils as a charset.

Submitted by:	Steve Downey


git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@137073 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2002-09-29 07:13:07 +00:00
parent 184b637342
commit e42273b9f2
1 changed files with 3 additions and 1 deletions

View File

@ -65,7 +65,7 @@
* *
* @author <a href="mailto:bayard@generationjava.com">Henri Yandell</a> * @author <a href="mailto:bayard@generationjava.com">Henri Yandell</a>
* @author <a href="mailto:ridesmet@users.sourceforge.net">Ringo De Smet</a> * @author <a href="mailto:ridesmet@users.sourceforge.net">Ringo De Smet</a>
* @version $Id: CharSetUtilsTest.java,v 1.3 2002/07/21 20:19:50 bayard Exp $ * @version $Id: CharSetUtilsTest.java,v 1.4 2002/09/29 07:13:07 bayard Exp $
*/ */
public class CharSetUtilsTest extends TestCase public class CharSetUtilsTest extends TestCase
{ {
@ -133,6 +133,8 @@ public void testDelete()
"hello", CharSetUtils.delete("hello", new String[] {""})); "hello", CharSetUtils.delete("hello", new String[] {""}));
assertEquals("delete(String,String[]) failed", assertEquals("delete(String,String[]) failed",
"", CharSetUtils.delete("hello", new String[] {"a-z"})); "", CharSetUtils.delete("hello", new String[] {"a-z"}));
assertEquals("delete(String,String[]) failed",
"", CharSetUtils.delete("----", new String[] {"-"}));
assertEquals("delete(String,String[]) failed", assertEquals("delete(String,String[]) failed",
"heo", CharSetUtils.delete("hello", new String[] {"l"})); "heo", CharSetUtils.delete("hello", new String[] {"l"}));
} }