This commit is contained in:
Looly 2023-12-12 02:53:02 +08:00
parent 5f88089e4e
commit 47847fc7a3

View File

@ -12,6 +12,8 @@
package org.dromara.hutool.core.text.split; package org.dromara.hutool.core.text.split;
import org.dromara.hutool.core.collection.ListUtil;
import org.dromara.hutool.core.lang.Console;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@ -22,7 +24,7 @@ import java.util.List;
* @author Looly * @author Looly
* *
*/ */
public class StrSplitterTest { public class SplitUtilTest {
@Test @Test
public void splitByCharTest(){ public void splitByCharTest(){
@ -114,4 +116,10 @@ public class StrSplitterTest {
Assertions.assertEquals(" 345678901823456178", strings.get(1)); Assertions.assertEquals(" 345678901823456178", strings.get(1));
Assertions.assertEquals("", strings.get(2)); Assertions.assertEquals("", strings.get(2));
} }
@Test
void issue3421Test() {
final List<String> strings = SplitUtil.splitByRegex("", "", 0, false, false);
Assertions.assertEquals(ListUtil.empty(), strings);
}
} }