Add an additional test for LANG-1055

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1654135 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2015-01-23 08:10:41 +00:00
parent 63f1d6b83b
commit 3181b40766
2 changed files with 13 additions and 0 deletions

View File

@ -22,6 +22,7 @@
<body>
<release version="3.4" date="tba" description="tba">
<action issue="LANG-1055" type="fix" dev="britter" due-to="Jonathan Baker">StrSubstitutor.replaceSystemProperties does not work consistently</action>
<action issue="LANG-1082" type="add" dev="britter" due-to="Jonathan Baker">Add option to disable the "objectsTriviallyEqual" test in DiffBuilder</action>
<action issue="LANG-1083" type="fix" dev="britter" due-to="Jonathan Baker">Add (T) casts to get unit tests to pass in old JDK</action>
<action issue="LANG-1015" type="add" dev="britter" due-to="Thiago Andrade">Add JsonToStringStyle implementation to ToStringStyle</action>

View File

@ -589,6 +589,18 @@ public class StrSubstitutorTest {
+ "directory is ${user.home}."));
}
/**
* Test for LANG-1055: StrSubstitutor.replaceSystemProperties does not work consistently
*/
@Test
public void testLANG1055() {
System.setProperty("test_key", "test_value");
String expected = StrSubstitutor.replace("test_key=${test_key}", System.getProperties());
String actual = StrSubstitutor.replaceSystemProperties("test_key=${test_key}");
assertEquals(expected, actual);
}
/**
* Test the replace of a properties object
*/