LANG-1118 Adding a test case for StringUtils.repeat(String, int) checking dealing with negative repeat value

This commit is contained in:
Loic Guibert 2015-04-23 15:43:21 +04:00 committed by Benedikt Ritter
parent 1b9d938d66
commit 4ad74f4492
1 changed files with 1 additions and 0 deletions

View File

@ -1353,6 +1353,7 @@ public class StringUtilsTest {
assertEquals("", StringUtils.repeat("ab", 0));
assertEquals("", StringUtils.repeat("", 3));
assertEquals("aaa", StringUtils.repeat("a", 3));
assertEquals("", StringUtils.repeat("a", -2));
assertEquals("ababab", StringUtils.repeat("ab", 3));
assertEquals("abcabcabc", StringUtils.repeat("abc", 3));
final String str = StringUtils.repeat("a", 10000); // bigger than pad limit