You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by gg...@apache.org on 2005/07/25 23:11:34 UTC
svn commit: r225184 -
/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/text/VariableFormatterTest.java
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