You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2008/02/18 10:58:49 UTC
svn commit: r628672 -
/incubator/sling/trunk/scripting/javascript/src/test/java/org/apache/sling/scripting/javascript/helper/EspReaderTest.java
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();