This is an automated email from the ASF dual-hosted git repository.
ggregory 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 7aaef9e More tests.
7aaef9e is described below
commit 7aaef9eda66f3f5f0f567428ea839d951843cbda
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jul 11 18:29:51 2020 -0400
More tests.
---
src/test/java/org/apache/commons/text/StringSubstitutorTest.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
index a4c7418..4eaa12e 100644
--- a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
+++ b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
@@ -408,6 +408,9 @@ public class StringSubstitutorTest {
@Test
public void testReplaceEscaping() throws IOException {
doReplace("The ${animal} jumps over the lazy dog.", "The $${animal}
jumps over the ${target}.", true);
+ doReplace("${a}", "$${a}", false);
+ doReplace("${a${a}}", "$${a$${a}}", false);
+ doReplace("${a${a${a}}}", "$${a$${a$${a}}}", false);
}
/**
@@ -951,6 +954,8 @@ public class StringSubstitutorTest {
@Disabled
public void testReplaceWeirdPattens_Partial_JiraText178() throws
IOException {
doReplace("${1}", "$${${a}}", false);
+ doReplace("${12}", "$${${a}${b}}", false);
+ doReplace("${${${a}2", "${${${a}${b}", false);
doReplace("$${1", "$${${a}", false);
}