Fixing javadoc example and adding a unit test to prove the example; as reported in #LANG-278
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@442618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
66704164a0
commit
ba57d261f1
|
@ -2795,7 +2795,7 @@ public class StringUtils {
|
|||
* StringUtils.removeEnd(null, *) = null
|
||||
* StringUtils.removeEnd("", *) = ""
|
||||
* StringUtils.removeEnd(*, null) = *
|
||||
* StringUtils.removeEnd("www.domain.com", ".com.") = "www,domain"
|
||||
* StringUtils.removeEnd("www.domain.com", ".com.") = "www.domain.com."
|
||||
* StringUtils.removeEnd("www.domain.com", ".com") = "www.domain"
|
||||
* StringUtils.removeEnd("www.domain.com", "domain") = "www.domain.com"
|
||||
* StringUtils.removeEnd("abc", "") = "abc"
|
||||
|
|
|
@ -1482,6 +1482,7 @@ public class StringUtilsTest extends TestCase {
|
|||
assertEquals(StringUtils.removeEnd("", "a"), "");
|
||||
|
||||
// All others:
|
||||
assertEquals(StringUtils.removeEnd("www.domain.com.", ".com"), "www.domain.com.");
|
||||
assertEquals(StringUtils.removeEnd("www.domain.com", ".com"), "www.domain");
|
||||
assertEquals(StringUtils.removeEnd("www.domain", ".com"), "www.domain");
|
||||
assertEquals(StringUtils.removeEnd("domain.com", ""), "domain.com");
|
||||
|
|
Loading…
Reference in New Issue