[TEXT-178] StringSubstitutor incorrectly removes some escape characters (original) (raw)
- Type:
Bug
- Status: Resolved
- Priority:
Major
- Resolution: Fixed
- Affects Version/s: None
- Fix Version/s: 1.9
The class StringSubstitutor incorrectly removes escape characters.
Note that these tests pass:
/**
* Tests interpolation with weird boundary patterns.
*/
@Test
public void testReplaceWeirdPattens() throws IOException {
doTestNoReplace(StringUtils.EMPTY);
doTestNoReplace(EMPTY_EXPR);
doTestNoReplace("${ }");
doTestNoReplace("${\t}");
doTestNoReplace("${\n}");
doTestNoReplace("${\b}");
doTestNoReplace("${");
doTestNoReplace("$}");
doTestNoReplace("$$}");
doTestNoReplace("}");
doTestNoReplace("${}$");
doTestNoReplace("${}$$");
doTestNoReplace("${${");
doTestNoReplace("${${}}");
doTestNoReplace("${$${}}");
doTestNoReplace("${$$${}}");
doTestNoReplace("${$$${$}}");
doTestNoReplace("${${}}");
doTestNoReplace("${${ }}");
}But these tests fail:
/**
* Tests interpolation with weird boundary patterns.
*/
@Test
@Disabled
public void testReplaceWeirdPattensJira() throws IOException {
doTestNoReplace("$${");
doTestNoReplace("$${a");
doTestNoReplace("$$${");
doTestNoReplace("$$${a");
}is related to
TEXT-179 StringSubstitutor incorrectly removes the escape character in "$${${a}"
- Resolved
links to