This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-configuration.git


The following commit(s) were added to refs/heads/master by this push:
     new 7fdbd3ed5 Add assertions in 
TestConfigurationInterpolator.testInterpolationDefaultValueNestedDefaultPrefix()
7fdbd3ed5 is described below

commit 7fdbd3ed546ad67e10652c760ab985e75e6861f6
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Jul 8 17:48:31 2026 -0400

    Add assertions in
    
TestConfigurationInterpolator.testInterpolationDefaultValueNestedDefaultPrefix()
---
 .../configuration2/interpol/TestConfigurationInterpolator.java        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/src/test/java/org/apache/commons/configuration2/interpol/TestConfigurationInterpolator.java
 
b/src/test/java/org/apache/commons/configuration2/interpol/TestConfigurationInterpolator.java
index 8f208c75a..0b9e09437 100644
--- 
a/src/test/java/org/apache/commons/configuration2/interpol/TestConfigurationInterpolator.java
+++ 
b/src/test/java/org/apache/commons/configuration2/interpol/TestConfigurationInterpolator.java
@@ -481,6 +481,7 @@ public class TestConfigurationInterpolator {
         assertEquals(valueStr, 
confInt.interpolate("${UnknownKey1:-${UnknownKey2:-${" + TEST_NAME + 
":-123}}}"));
         assertEquals(valueStr, 
confInt.interpolate("${UnknownKey1:-${UnknownKey2:-${UnknownKey3:-${" + 
TEST_NAME + ":-123}}}}"));
         assertEquals("123", 
confInt.interpolate("${UnknownKey1:-${UnknownKey2:-${UnknownKey3:-123}}}"));
+        assertEquals("http://localhost:8080/abc";, 
confInt.interpolate("${UnknownKey1:-${UnknownKey2:-${UnknownKey3:-http://localhost:8080/abc}}}";));
     }
 
     @Test
@@ -495,6 +496,9 @@ public class TestConfigurationInterpolator {
         assertEquals(valueStr, 
confInt.interpolate("${sys:UnknownKey1:-${sys:UnknownKey2:-${sys:" + SP_KEY + 
":-123}}}"));
         assertEquals(valueStr, 
confInt.interpolate("${sys:UnknownKey1:-${sys:UnknownKey2:-${sys:UnknownKey3:-${sys:"
 + SP_KEY + ":-123}}}}"));
         assertEquals("123", 
confInt.interpolate("${sys:UnknownKey1:-${sys:UnknownKey2:-${sys:UnknownKey3:-123}}}"));
+        assertEquals("http://localhost:8080/abc";, 
confInt.interpolate("${sys:UnknownKey1:-http://localhost:8080/abc}";));
+        assertEquals("http://localhost:8080/abc";, 
confInt.interpolate("${sys:UnknownKey1:-${sys:UnknownKey2:-http://localhost:8080/abc}}";));
+        assertEquals("http://localhost:8080/abc";, 
confInt.interpolate("${sys:UnknownKey1:-${sys:UnknownKey2:-${sys:UnknownKey3:-http://localhost:8080/abc}}}";));
     }
 
     /**

Reply via email to