commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r554209 - /jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
Date Sat, 07 Jul 2007 14:09:14 GMT
Author: oheger
Date: Sat Jul  7 07:09:12 2007
New Revision: 554209

URL: http://svn.apache.org/viewvc?view=rev&rev=554209
Log:
Added a test case for variable interpolation and escaping after a report on the user list

Modified:
    jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java

Modified: jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java?view=diff&rev=554209&r1=554208&r2=554209
==============================================================================
--- jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
(original)
+++ jakarta/commons/proper/configuration/trunk/src/test/org/apache/commons/configuration/TestAbstractConfigurationBasicFeatures.java
Sat Jul  7 07:09:12 2007
@@ -61,6 +61,24 @@
     }
 
     /**
+     * Tests escaping the variable marker, so that no interpolation will be
+     * performed.
+     */
+    public void testInterpolateEscape()
+    {
+        AbstractConfiguration config = new TestConfigurationImpl(
+                new PropertiesConfiguration());
+        config
+                .addProperty(
+                        "mypath",
+                        "$${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar\\,$${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar");
+        assertEquals(
+                "Wrong interpolated value",
+                "${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc.jar,${DB2UNIVERSAL_JDBC_DRIVER_PATH}/db2jcc_license_cu.jar",
+                config.getString("mypath"));
+    }
+
+    /**
      * A test configuration implementation. This implementation inherits
      * directly from AbstractConfiguration. For implementing the required
      * functionality another implementation of AbstractConfiguration is used;



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message