tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r933141 - /tomcat/trunk/test/org/apache/el/parser/TestELParser.java
Date Mon, 12 Apr 2010 08:32:23 GMT
Author: markt
Date: Mon Apr 12 08:32:22 2010
New Revision: 933141

URL: http://svn.apache.org/viewvc?rev=933141&view=rev
Log:
Add some additional tests

Modified:
    tomcat/trunk/test/org/apache/el/parser/TestELParser.java

Modified: tomcat/trunk/test/org/apache/el/parser/TestELParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/el/parser/TestELParser.java?rev=933141&r1=933140&r2=933141&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/el/parser/TestELParser.java (original)
+++ tomcat/trunk/test/org/apache/el/parser/TestELParser.java Mon Apr 12 08:32:22 2010
@@ -28,8 +28,32 @@ import junit.framework.TestCase;
 public class TestELParser extends TestCase {
 
     public void testBug49081() {
+        // OP's report
         testExpression("#${1+1}", "#2");
-    }
+        
+        // Variations on a theme
+        testExpression("#", "#");
+        testExpression("##", "##");
+        testExpression("###", "###");
+        testExpression("$", "$");
+        testExpression("$$", "$$");
+        testExpression("$$$", "$$$");
+        testExpression("#$", "#$");
+        testExpression("#$#", "#$#");
+        testExpression("$#", "$#");
+        testExpression("$#$", "$#$");
+
+        testExpression("#{1+1}", "2");
+        testExpression("##{1+1}", "#2");
+        testExpression("###{1+1}", "##2");
+        testExpression("${1+1}", "2");
+        testExpression("$${1+1}", "$2");
+        testExpression("$$${1+1}", "$$2");
+        testExpression("#${1+1}", "#2");
+        testExpression("#$#{1+1}", "#$2");
+        testExpression("$#{1+1}", "$2");
+        testExpression("$#${1+1}", "$#2");
+}
 
     private void testExpression(String expression, String expected) {
         ExpressionFactory factory = ExpressionFactory.newInstance();



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


Mime
View raw message