Author: bdelacretaz
Date: Fri Sep 26 09:24:02 2008
New Revision: 699396
URL: http://svn.apache.org/viewvc?rev=699396&view=rev
Log:
SLING-428 - use a function in test scripts to show how that's done
Modified:
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/EspLoadTest.java
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/included-a.esp
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/main.esp
Modified:
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/EspLoadTest.java
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/EspLoadTest.java?rev=699396&r1=699395&r2=699396&view=diff
==============================================================================
---
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/EspLoadTest.java
(original)
+++
incubator/sling/trunk/launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/EspLoadTest.java
Fri Sep 26 09:24:02 2008
@@ -56,7 +56,8 @@
"included-a.esp before load",
"included-b.esp",
"included-a.esp after load",
- "main.esp after load"
+ "main.esp after load",
+ "Here's more from included-a"
};
int pos = 0;
Modified:
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/included-a.esp
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/included-a.esp?rev=699396&r1=699395&r2=699396&view=diff
==============================================================================
---
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/included-a.esp
(original)
+++
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/included-a.esp
Fri Sep 26 09:24:02 2008
@@ -22,4 +22,12 @@
<% load("subfolder/included-b.esp"); %>
-included-a.esp after load
\ No newline at end of file
+included-a.esp after load
+
+<%
+// esp is templating, so one needs to enclose functions
+// in the appropriate markers
+function functionFromIncludedA() {
+ %>Here's more from included-a<%
+}
+%>
\ No newline at end of file
Modified:
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/main.esp
URL:
http://svn.apache.org/viewvc/incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/main.esp?rev=699396&r1=699395&r2=699396&view=diff
==============================================================================
---
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/main.esp
(original)
+++
incubator/sling/trunk/launchpad/testing/src/test/resources/integration-test/esp-load/main.esp
Fri Sep 26 09:24:02 2008
@@ -22,4 +22,6 @@
<% load(currentNode.scriptToInclude); %>
-main.esp after load
\ No newline at end of file
+main.esp after load
+
+<% functionFromIncludedA() %>
\ No newline at end of file