incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r628672 - /incubator/sling/trunk/scripting/javascript/src/test/java/org/apache/sling/scripting/javascript/helper/EspReaderTest.java
Date Mon, 18 Feb 2008 09:58:49 GMT
Author: bdelacretaz
Date: Mon Feb 18 01:58:44 2008
New Revision: 628672

URL: http://svn.apache.org/viewvc?rev=628672&view=rev
Log:
Test added to demonstrate SLING-253

Modified:
    incubator/sling/trunk/scripting/javascript/src/test/java/org/apache/sling/scripting/javascript/helper/EspReaderTest.java

Modified: incubator/sling/trunk/scripting/javascript/src/test/java/org/apache/sling/scripting/javascript/helper/EspReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/javascript/src/test/java/org/apache/sling/scripting/javascript/helper/EspReaderTest.java?rev=628672&r1=628671&r2=628672&view=diff
==============================================================================
--- incubator/sling/trunk/scripting/javascript/src/test/java/org/apache/sling/scripting/javascript/helper/EspReaderTest.java
(original)
+++ incubator/sling/trunk/scripting/javascript/src/test/java/org/apache/sling/scripting/javascript/helper/EspReaderTest.java
Mon Feb 18 01:58:44 2008
@@ -234,6 +234,28 @@
         assertEquals(expected, actual);
     }
     
+    public void testColon() throws IOException {
+        final String input = "currentNode.text:<%= currentNode.text %>";
+        final String expected = 
+            "out=response.writer;" 
+            + "out.write(\"currentNode.text:\");"
+            + "out.write( currentNode.text );"
+            ;
+        final String actual = parse(input);
+        assertEquals(expected, actual);
+    }
+    
+    public void DISABLED_SEE_SLING_253_testEqualSigns() throws IOException {
+        final String input = "currentNode.text=<%= currentNode.text %>";
+        final String expected = 
+            "out=response.writer;" 
+            + "out.write(\"currentNode.text=\");"
+            + "out.write( currentNode.text );"
+            ;
+        final String actual = parse(input);
+        assertEquals(expected, actual);
+    }
+    
     /** Helper to pass an ESP text through the EspReader and return the result */
     private String parse(String text) throws IOException {
         StringBuffer buf = new StringBuffer();



Mime
View raw message