This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git
The following commit(s) were added to refs/heads/master by this push:
new d2875b5e Add test from Commons Lang
d2875b5e is described below
commit d2875b5e90ad213ab38e458a272cef95dde11ce6
Author: Gary Gregory <[email protected]>
AuthorDate: Sun May 17 13:50:47 2026 +0000
Add test from Commons Lang
---
src/test/java/org/apache/commons/text/WordUtilsTest.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/test/java/org/apache/commons/text/WordUtilsTest.java
b/src/test/java/org/apache/commons/text/WordUtilsTest.java
index 5ae96de4..429a8934 100644
--- a/src/test/java/org/apache/commons/text/WordUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/WordUtilsTest.java
@@ -21,10 +21,12 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTimeout;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
+import java.time.Duration;
import java.util.stream.IntStream;
import org.apache.commons.lang3.ArrayUtils;
@@ -580,4 +582,9 @@ class WordUtilsTest {
assertEquals("abc\ndef", WordUtils.wrap("abcdef", 2, "\n", false,
"(?=d)"));
}
+ @Test
+ void testZeroWidthWrapOnRegex() {
+ assertTimeout(Duration.ofSeconds(2), () ->
assertNotNull(WordUtils.wrap("abcdef", 3, "\n", false, "(?=a)")));
+ }
+
}