SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
* added test content
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/selector.html b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/selector.html
new file mode 100644
index 0000000..c76059c
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/selector.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<span id="synthetic-resource-selector">It works!</span>
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/syntheticresource.html b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/syntheticresource.html
new file mode 100644
index 0000000..fd30b8f
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresource/syntheticresource.html
@@ -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.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<div id="synthetic-resource">
+ <span class="wrapper-text">Testing synthetic resource delegation</span>
+ <div class="wrapper" data-sly-resource="${@ selectors='selector'}"></div>
+</div>
diff --git a/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresourcecaller/syntheticresourcecaller.html b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresourcecaller/syntheticresourcecaller.html
new file mode 100644
index 0000000..413c010
--- /dev/null
+++ b/src/main/resources/SLING-INF/apps/sightly/scripts/syntheticresourcecaller/syntheticresourcecaller.html
@@ -0,0 +1,19 @@
+<!--/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/-->
+<div id="caller" data-sly-resource="${'/content/lorem-ipsum' @ resourceType='/apps/sightly/scripts/syntheticresource'}"></div>
diff --git a/src/main/resources/SLING-INF/sightly.json b/src/main/resources/SLING-INF/sightly.json
index 6588dcd..0d8ac4b 100644
--- a/src/main/resources/SLING-INF/sightly.json
+++ b/src/main/resources/SLING-INF/sightly.json
@@ -67,5 +67,10 @@
},
"resource.with.dots.in.path": {
"jcr:primaryType": "nt:unstructured"
+ },
+ "synthetic-resource": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "/apps/sightly/scripts/syntheticresourcecaller"
}
+
}