incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r586451 - /incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/scripting/helpers/EspReaderTest.java
Date Fri, 19 Oct 2007 13:45:57 GMT
Author: fmeschbe
Date: Fri Oct 19 06:45:56 2007
New Revision: 586451

URL: http://svn.apache.org/viewvc?rev=586451&view=rev
Log:
Adapt the tests to the new EspReader on-demand definition of the out variable

Added:
    incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/scripting/helpers/EspReaderTest.java
      - copied, changed from r585388, incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/etc/EspReaderTest.java

Copied: incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/scripting/helpers/EspReaderTest.java
(from r585388, incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/etc/EspReaderTest.java)
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/scripting/helpers/EspReaderTest.java?p2=incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/scripting/helpers/EspReaderTest.java&p1=incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/etc/EspReaderTest.java&r1=585388&r2=586451&rev=586451&view=diff
==============================================================================
--- incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/etc/EspReaderTest.java
(original)
+++ incubator/sling/whiteboard/microsling/src/test/java/org/apache/sling/microsling/scripting/helpers/EspReaderTest.java
Fri Oct 19 06:45:56 2007
@@ -12,7 +12,7 @@
  * accordance with the terms of the license agreement you entered into
  * with Day.
  */
-package org.apache.sling.microsling.etc;
+package org.apache.sling.microsling.scripting.helpers;
 
 import java.io.IOException;
 import java.io.Reader;
@@ -31,8 +31,8 @@
 
     /** Test standard template text */
     public void testTemplate() throws IOException {
-        assertEquals("out.write(\"test\");", parse("test"));
-        assertEquals("out.write(\"test\\n\");\nout.write(\"test2\");", parse("test\ntest2"));
+        assertEquals("out=response.writer;out.write(\"test\");", parse("test"));
+        assertEquals("out=response.writer;out.write(\"test\\n\");\nout.write(\"test2\");",
parse("test\ntest2"));
     }
 
     /** Test plain JavaScript code */
@@ -43,8 +43,8 @@
 
     /** Test JavaScript expressions */
     public void testExpr() throws IOException {
-        assertEquals("out.write( x + 1 );", parse("<%= x + 1 %>"));
-        assertEquals("out.write(\"<!-- \");out.write( x + 1 );out.write(\" -->\");",
parse("<!-- <%= x + 1 %> -->"));
+        assertEquals("out=response.writer;out.write( x + 1 );", parse("<%= x + 1 %>"));
+        assertEquals("out=response.writer;out.write(\"<!-- \");out.write( x + 1 );out.write(\"
-->\");", parse("<!-- <%= x + 1 %> -->"));
     }
 
     /** Test JavaScript comment */



Mime
View raw message