Test mixing ${...} and #{...} in the same expression
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 31 Jan 2010 00:56:47 +0000 (00:56 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 31 Jan 2010 00:56:47 +0000 (00:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@904943 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/el/TestELEvaluation.java

index ad16198..d394c2d 100644 (file)
@@ -171,6 +171,22 @@ public class TestELEvaluation extends TestCase {
         assertTrue(null == null);
     }
 
+    /**
+     * Test mixing ${...} and #{...} in the same expression.
+     */
+    public void testMixedTypes() {
+        // Mixing types should throw an error
+        Exception e = null;
+        try {
+            evaluateExpression("${1+1}#{1+1}");
+        } catch (ELException el) {
+            e = el;
+        }
+        assertNotNull(e);
+    }
+
+
+
     // ************************************************************************
 
     private String evaluateExpression(String expression) {