incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1155170 - in /sling/trunk/launchpad/integration-tests/src/main: java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java resources/integration-test/example.tag resources/integration-test/withtag.jsp
Date Tue, 09 Aug 2011 00:30:14 GMT
Author: justin
Date: Tue Aug  9 00:30:13 2011
New Revision: 1155170

URL: http://svn.apache.org/viewvc?rev=1155170&view=rev
Log:
SLING-2138 - adding IT

Added:
    sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/example.tag
    sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/withtag.jsp
Modified:
    sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java

Modified: sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java?rev=1155170&r1=1155169&r2=1155170&view=diff
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java
(original)
+++ sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JspScriptingTest.java
Tue Aug  9 00:30:13 2011
@@ -78,6 +78,27 @@ public class JspScriptingTest extends Js
         }
     }
 
+    public void testTagFile() throws Exception {
+        String tagFile = null;
+        String tagUsingScript = null;
+        try {
+            testClient.mkdirs(WEBDAV_BASE_URL, "/apps/testing/tags");
+            tagFile = uploadTestScript("/apps/testing/tags", "example.tag", "example.tag");
+            tagUsingScript = uploadTestScript(unstructuredNode.scriptPath, "withtag.jsp",
"html.jsp");
+
+            final String content = getContent(unstructuredNode.nodeUrl + ".html", CONTENT_TYPE_HTML);
+            assertTrue("JSP script executed as expected (" + content + ")", content.contains("<h1>Hello,
Sling User</h1>"));
+
+        } finally {
+            if (tagFile != null) {
+                testClient.delete(tagFile);
+            }
+            if (tagUsingScript != null) {
+                testClient.delete(tagUsingScript);
+            }
+        }
+    }
+
     /* Verify that overwriting a JSP script changes the output within a reasonable time 
      * (might not be immediate as there's some observation and caching involved) */
     public void testChangingJsp() throws Exception {

Added: sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/example.tag
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/example.tag?rev=1155170&view=auto
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/example.tag
(added)
+++ sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/example.tag
Tue Aug  9 00:30:13 2011
@@ -0,0 +1,23 @@
+<%--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+--%>
+<%@ attribute name="greeting" required="true" %>
+<%@ attribute name="name" required="true" %>
+<h1>${greeting}, ${name}</h1> 
\ No newline at end of file

Added: sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/withtag.jsp
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/withtag.jsp?rev=1155170&view=auto
==============================================================================
--- sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/withtag.jsp
(added)
+++ sling/trunk/launchpad/integration-tests/src/main/resources/integration-test/withtag.jsp
Tue Aug  9 00:30:13 2011
@@ -0,0 +1,22 @@
+<%--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+--%>
+<%@ taglib tagdir="/WEB-INF/tags/apps/testing/tags" prefix="t" %> 
+<t:example greeting="Hello" name="Sling User"/>
\ No newline at end of file



Mime
View raw message