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-lang.git
The following commit(s) were added to refs/heads/master by this push:
new b6a5e06f8 Add
org.apache.commons.lang3.SystemPropertiesTest.testGetPropertyStringString()
b6a5e06f8 is described below
commit b6a5e06f893a16983cc4c90b04e4f93ce34b0a45
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Jun 25 08:37:28 2025 -0400
Add
org.apache.commons.lang3.SystemPropertiesTest.testGetPropertyStringString()
---
.../java/org/apache/commons/lang3/SystemPropertiesTest.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java
b/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java
index 50af0f90e..200ea871c 100644
--- a/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java
+++ b/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java
@@ -702,6 +702,19 @@ void testGetPathSeparator() {
assertNotNull(SystemProperties.getPathSeparator());
}
+ @Test
+ @SetSystemProperties({ @SetSystemProperty(key = STRING_SPACE_1, value =
"value1"), @SetSystemProperty(key = STRING_TAB_1, value = "value2") })
+ void testGetPropertyStringString() {
+ assertNull(SystemProperties.getProperty(null, (String) null));
+ assertNull(SystemProperties.getProperty(StringUtils.EMPTY, (String)
null));
+ assertEquals("value1", SystemProperties.getProperty(STRING_SPACE_1,
(String) null));
+ assertEquals("value2", SystemProperties.getProperty("\t", (String)
null));
+ assertEquals("x", SystemProperties.getProperty(null, "x"));
+ assertEquals("x", SystemProperties.getProperty(StringUtils.EMPTY,
"x"));
+ assertEquals("value1", SystemProperties.getProperty(STRING_SPACE_1,
"v"));
+ assertEquals("value2", SystemProperties.getProperty("\t", "v"));
+ }
+
@Test
@SetSystemProperties({ @SetSystemProperty(key = STRING_SPACE_1, value =
"value1"), @SetSystemProperty(key = STRING_TAB_1, value = "value2") })
void testGetPropertyStringSupplier() {