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
commit a95191994a0503ba311f02a41b21dabe4167d7b7 Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Fri Aug 14 01:34:31 2020 -0400 Sort methods. --- .../apache/commons/text/StringSubstitutorTest.java | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java index 3c23b23..f7301b5 100644 --- a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java +++ b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java @@ -254,31 +254,31 @@ public class StringSubstitutorTest { * Tests interpolation with weird boundary patterns. */ @Test - public void testReplace_JiraText178_WeirdPatterns2() throws IOException { - doReplace("${1}", "$${${a}}", false); + public void testReplace_JiraText178_WeirdPatterns1() throws IOException { + doNotReplace("$${"); + doNotReplace("$${a"); + doNotReplace("$$${"); + doNotReplace("$$${a"); + doNotReplace("$${${a"); + doNotReplace("${${a}"); // "${a" is not a registered variable name. + doNotReplace("${$${a}"); } /** * Tests interpolation with weird boundary patterns. */ @Test - @Disabled - public void testReplace_JiraText178_WeirdPatterns3() throws IOException { - doReplace("${${a}", "$${${a}", false); // not "$${1" or "${1" + public void testReplace_JiraText178_WeirdPatterns2() throws IOException { + doReplace("${1}", "$${${a}}", false); } /** * Tests interpolation with weird boundary patterns. */ @Test - public void testReplace_JiraText178_WeirdPatterns1() throws IOException { - doNotReplace("$${"); - doNotReplace("$${a"); - doNotReplace("$$${"); - doNotReplace("$$${a"); - doNotReplace("$${${a"); - doNotReplace("${${a}"); // "${a" is not a registered variable name. - doNotReplace("${$${a}"); + @Disabled + public void testReplace_JiraText178_WeirdPatterns3() throws IOException { + doReplace("${${a}", "$${${a}", false); // not "$${1" or "${1" } /**