commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r225184 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
Date Mon, 25 Jul 2005 21:11:34 GMT
Author: ggregory
Date: Mon Jul 25 14:11:32 2005
New Revision: 225184

URL: http://svn.apache.org/viewcvs?rev=225184&view=rev
Log:
Another new boundary tests for VariableFormatterTest.java.

Modified:
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java?rev=225184&r1=225183&r2=225184&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
Mon Jul 25 14:11:32 2005
@@ -303,6 +303,29 @@
             + "directory is ${user.home}."));
     }
 
+    /**
+     * Tests interpolation with weird boundary patterns.
+     */
+    public void testReplaceWeirdPattens() {
+        testReplaceNoElement("");
+        testReplaceNoElement("${}");
+        testReplaceNoElement("${ }");
+        testReplaceNoElement("${\t}");
+        testReplaceNoElement("${\n}");
+        testReplaceNoElement("${\b}");
+        testReplaceNoElement("${");
+        testReplaceNoElement("$}");
+        testReplaceNoElement("}");
+        testReplaceNoElement("${}$");
+        testReplaceNoElement("${${");
+        testReplaceNoElement("${${}}");
+        testReplaceNoElement("${$${}}");
+        testReplaceNoElement("${$$${}}");
+        testReplaceNoElement("${$$${$}}");
+        testReplaceNoElement("${${}}");
+        testReplaceNoElement("${${ }}");
+    }
+
     void validateNoReplace(VariableFormatter formatter) {
         String srcString = "Hello ${user.name}";
         String destString = formatter.replace(srcString);



---------------------------------------------------------------------
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