incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r602890 - in /incubator/sling/trunk/microsling/microsling-core/src/test: java/org/apache/sling/microsling/integration/SlingResourceTypeRenderingTest.java resources/integration-test/rendering-test.ect
Date Mon, 10 Dec 2007 12:59:32 GMT
Author: bdelacretaz
Date: Mon Dec 10 04:59:31 2007
New Revision: 602890

URL: http://svn.apache.org/viewvc?rev=602890&view=rev
Log:
SLING-114 - SlingResourceTypeRenderingTest.testEctHtmlScriptTagB test demonstrates a problem
in the special <script> tag handling for ECT templates. The test fails for now, commented
out

Modified:
    incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/SlingResourceTypeRenderingTest.java
    incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/rendering-test.ect

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/SlingResourceTypeRenderingTest.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/SlingResourceTypeRenderingTest.java?rev=602890&r1=602889&r2=602890&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/SlingResourceTypeRenderingTest.java
(original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/java/org/apache/sling/microsling/integration/SlingResourceTypeRenderingTest.java
Mon Dec 10 04:59:31 2007
@@ -154,7 +154,7 @@
         }
     }
 
-    public void testEctHtmlScriptTag() throws IOException {
+    public void testEctHtmlScriptTagA() throws IOException {
         final String toDelete = uploadTestScript("rendering-test.ect","html.ect");
         try {
             final String content = getContent(displayUrl + ".html", CONTENT_TYPE_HTML);
@@ -169,6 +169,24 @@
             testClient.delete(toDelete);
         }
     }
+
+    /** TODO this test currently fails, see SLING-114
+    public void testEctHtmlScriptTagB() throws IOException {
+        final String toDelete = uploadTestScript("rendering-test.ect","html.ect");
+        try {
+            final String content = getContent(displayUrl + ".html", CONTENT_TYPE_HTML);
+            assertTrue("Content includes ECT marker",content.contains("ECT template"));
+            assertTrue("Content contains scripted stuff (" + content + ")",
+                    content.contains("more scripting"));
+            assertFalse("Script opening tag must be broken in two in content (" + content
+ ")",
+                    content.contains("<script>more")); 
+            assertFalse("Script closing tag must be broken in two in content (" + content
+ ")",
+                    content.contains("scripting</script>")); 
+        } finally {
+            testClient.delete(toDelete);
+        }
+    }
+    */
 
     public void testEspHtmlUppercase() throws IOException {
         final String toDelete = uploadTestScript("rendering-test.esp","html.esp");

Modified: incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/rendering-test.ect
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/rendering-test.ect?rev=602890&r1=602889&r2=602890&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/rendering-test.ect
(original)
+++ incubator/sling/trunk/microsling/microsling-core/src/test/resources/integration-test/rendering-test.ect
Mon Dec 10 04:59:31 2007
@@ -14,4 +14,8 @@
 <!-- verify that script tag is broken in two when rendering -->
 <!-- (SLING-114) -->
  
-<script>something scripted</script>
\ No newline at end of file
+<script>something scripted</script>
+
+<% for(i=0; i< 10; i++) {
+} %><script>more scripting</script><% for(i=0; i< 10; i++) {
+} %>
\ No newline at end of file



Mime
View raw message