Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.jet.tests.core/data')
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet6
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet11
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet10
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected41
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet34
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected93
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet8
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet10
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt10
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc4
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet36
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected74
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet4
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected49
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc3
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet4
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected19
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected11
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet9
-rw-r--r--tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected16
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt1
-rw-r--r--tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt1
44 files changed, 506 insertions, 0 deletions
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet
new file mode 100644
index 0000000..99bf3cc
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/attributeParsingErrors.jet
@@ -0,0 +1,6 @@
+<%@taglib prefix="c" id="org.eclipse.jet.controlTags"%>
+
+<%-- The following line is missing a double quote (") on the 'var' attribute --%>
+<c:iterate select="foo" var="bar>
+ some text parameterized by bar: <c:get select="$bar"/>
+</c:iterate> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet
new file mode 100644
index 0000000..5a8e497
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/bug147714.jet
@@ -0,0 +1,11 @@
+<%-- Bug 147714 requests the JET compiler to treat <tag ...> as <tag .../> if tag is an emptyTag.
+This is for compatibility with DPTK: http://www.alphaworks.ibm.com/tech/dptk.
+Since DPTK does not use namespace prefixes, the fix only applies to tags with not prefix.
+--%>
+<%@taglib id="org.eclipse.jet.tests.TestLibrary2" prefix="c" %>
+<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="" %>
+
+<%-- line 8: expect error --%><c:nl>
+<%-- line 9: expect ok --%><c:nl/>
+<%-- line 10: expect warning --%><nl>
+<%-- line 11: expect ok --%><nl/>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet
new file mode 100644
index 0000000..2bc9dfc
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet
@@ -0,0 +1,10 @@
+<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
+"isAllUpper", "nl", "other", "tokenize", "upper"
+
+<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
+<test:other>some text</test:other>
+<test:isAllUpper var="token">
+</test:isAllUpper>
+<test:upper>foo</test:upper><test:nl/>
+<test:other/>
+</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected
new file mode 100644
index 0000000..b99d6d3
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/taglibs.jet.JETASTParser.astdump.expected
@@ -0,0 +1,41 @@
+<directive name="taglib" line="1" col="1">
+ <attribute name="id">org.eclipse.jet.tests.TestLibrary</attribute>
+ <attribute name="prefix">test</attribute>
+</directive>
+<data>"isAllUpper", "nl", "other", "tokenize", "upper"
+
+</data>
+<tag name="test:tokenize" line="4" col="1">
+ <attribute name="sep">,</attribute>
+ <attribute name="var">token</attribute>
+ <attribute name="string">a,b,c,d,e,f,g</attribute>
+ <content>
+ <data></data>
+ <tag name="test:other" line="5" col="1">
+ <content>
+ <data>some text</data>
+ </content>
+ </tag>
+ <data>
+</data>
+ <tag name="test:isAllUpper" line="6" col="1">
+ <attribute name="var">token</attribute>
+ <content>
+ <data></data>
+ </content>
+ </tag>
+ <data></data>
+ <tag name="test:upper" line="8" col="1">
+ <content>
+ <data>foo</data>
+ </content>
+ </tag>
+ <tag name="test:nl" line="8" col="29">
+ </tag>
+ <data>
+</data>
+ <tag name="test:other" line="9" col="1">
+ </tag>
+ <data></data>
+ </content>
+</tag>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet
new file mode 100644
index 0000000..ba01d6f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedComment.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<%-- String x = "Hello World!"; -%>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet
new file mode 100644
index 0000000..a12518f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDeclaration.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<%! public void foo() {} >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet
new file mode 100644
index 0000000..c822dec
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedDirective.jet
@@ -0,0 +1 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet
new file mode 100644
index 0000000..b67abe9
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedExpression.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<%= "Hello World!" >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet
new file mode 100644
index 0000000..dd654a9
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedScriplet.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<% String x = "Hello World!"; >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet
new file mode 100644
index 0000000..08f095f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLEnd.jet
@@ -0,0 +1,3 @@
+<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
+
+</test:include
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet
new file mode 100644
index 0000000..31f3ccf
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/ast/unclosedXMLStart.jet
@@ -0,0 +1,3 @@
+<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
+
+<test:include template="foo"
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet
new file mode 100644
index 0000000..241c44d
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet
@@ -0,0 +1,34 @@
+<%@jet class="Foo" package="org.eclipse.emf.examples"%>
+Some top level text.
+<%= "An expression" %>
+<%!
+int foo() {
+ return 3;
+}
+%>
+<%
+if(foo() > 0) {
+ foo();
+}
+%>
+<%-- a comment --%>
+<test:container one="test one" two='test two'>
+ <test:empty/>
+ <test:container>
+ some text <nontest:text attributes="foo"/>
+ </test:container>
+</test:container>
+<%-- tags containing Java --%>
+<test:container>
+ <%= foo(); %>
+ <% if(foo() > 0) { %>
+ some text
+ <% } %>
+</test:container>
+<%-- Java container tags --%>
+<% if(foo() > 0) { %>
+ some text
+ <test:empty/>
+ <test:container>
+ </test:container>
+<% } %>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected b/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected
new file mode 100644
index 0000000..43b65a2
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/alljet2.jet.expected
@@ -0,0 +1,93 @@
+<directive name="jet" start="(1,1)" stop="(1,56)">
+ <attribute name="class">Foo</attribute>
+ <attribute name="package">org.eclipse.emf.examples</attribute>
+</directive>
+<data>
+Some top level text.
+</data>
+<expression start="(3,4)" stop="(3,21)"> "An expression" </expression>
+<data>
+</data>
+<declaration start="(4,4)" stop="(8,1)">
+int foo() {
+ return 3;
+}
+</declaration>
+<data>
+</data>
+<scriptlet start="(9,3)" stop="(13,1)">
+if(foo() > 0) {
+ foo();
+}
+</scriptlet>
+<data>
+</data>
+<comment start="(14,5)" stop="(14,16)"> a comment </comment>
+<data>
+</data>
+<tag name="test:container" start="(15,1)" stop="(15,47)">
+ <attribute name="one">test one</attribute>
+ <attribute name="two">test two</attribute>
+ <content>
+ <data>
+ </data>
+ <tag name="test:empty" start="(16,5)" stop="(16,18)">
+ </tag>
+ <data>
+ </data>
+ <tag name="test:container" start="(17,5)" stop="(17,21)">
+ <content>
+ <data>
+ some text <nontest:text attributes="foo"/>
+ </data>
+ </content>
+ </tag>
+ <data>
+</data>
+ </content>
+</tag>
+<data>
+</data>
+<comment start="(21,5)" stop="(21,27)"> tags containing Java </comment>
+<data>
+</data>
+<tag name="test:container" start="(22,1)" stop="(22,17)">
+ <content>
+ <data>
+ </data>
+ <expression start="(23,8)" stop="(23,16)"> foo(); </expression>
+ <data>
+ </data>
+ <scriptlet start="(24,7)" stop="(24,24)"> if(foo() > 0) { </scriptlet>
+ <data>
+ some text
+ </data>
+ <scriptlet start="(26,7)" stop="(26,10)"> } </scriptlet>
+ <data>
+</data>
+ </content>
+</tag>
+<data>
+</data>
+<comment start="(28,5)" stop="(28,26)"> Java container tags </comment>
+<data>
+</data>
+<scriptlet start="(29,3)" stop="(29,20)"> if(foo() > 0) { </scriptlet>
+<data>
+ some text
+ </data>
+<tag name="test:empty" start="(31,9)" stop="(31,22)">
+</tag>
+<data>
+ </data>
+<tag name="test:container" start="(32,9)" stop="(32,25)">
+ <content>
+ <data>
+ </data>
+ </content>
+</tag>
+<data>
+</data>
+<scriptlet start="(34,3)" stop="(34,6)"> } </scriptlet>
+<data>
+</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet
new file mode 100644
index 0000000..ba01d6f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedComment.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<%-- String x = "Hello World!"; -%>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet
new file mode 100644
index 0000000..a12518f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDeclaration.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<%! public void foo() {} >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet
new file mode 100644
index 0000000..c822dec
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedDirective.jet
@@ -0,0 +1 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet
new file mode 100644
index 0000000..b67abe9
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedExpression.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<%= "Hello World!" >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet
new file mode 100644
index 0000000..dd654a9
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedScriplet.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<% String x = "Hello World!"; >
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet
new file mode 100644
index 0000000..08f095f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLEnd.jet
@@ -0,0 +1,3 @@
+<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
+
+</test:include
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet
new file mode 100644
index 0000000..31f3ccf
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/unclosedXMLStart.jet
@@ -0,0 +1,3 @@
+<%@taglib id="org.eclipse.jet.controlTags" prefix="test" %>
+
+<test:include template="foo"
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet
new file mode 100644
index 0000000..a614208
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlEndWithAttributes.jet
@@ -0,0 +1,3 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+</test:start attr="value">
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet b/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet
new file mode 100644
index 0000000..54760f5
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/legacy/xmlStartWithoutEnd.jet
@@ -0,0 +1,8 @@
+<%@jet package="org.eclipse.emf.examples.test" class="Foo" %>
+
+<test:start attr="value">
+
+<test:start2 attr="two">
+
+</test:start>
+</test:start2> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet b/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet
new file mode 100644
index 0000000..2bc9dfc
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet
@@ -0,0 +1,10 @@
+<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
+"isAllUpper", "nl", "other", "tokenize", "upper"
+
+<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
+<test:other>some text</test:other>
+<test:isAllUpper var="token">
+</test:isAllUpper>
+<test:upper>foo</test:upper><test:nl/>
+<test:other/>
+</test:tokenize> \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt b/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt
new file mode 100644
index 0000000..4fecfd7
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/lineinfo.jet.expected.txt
@@ -0,0 +1,10 @@
+1:69:<%@taglib id="org.eclipse.jet.tests.TestLibrary" prefix="test" %>
+2:48:"isAllUpper", "nl", "other", "tokenize", "upper"
+3:0:
+4:58:<test:tokenize string="a,b,c,d,e,f,g" sep="," var="token">
+5:34:<test:other>some text</test:other>
+6:29:<test:isAllUpper var="token">
+7:18:</test:isAllUpper>
+8:38:<test:upper>foo</test:upper><test:nl/>
+9:13:<test:other/>
+10:16:</test:tokenize>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc
new file mode 100644
index 0000000..1435b71
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/alt1/include2.jetinc
@@ -0,0 +1,3 @@
+This is content from include2.jetinc in alt1.
+<%@ include file="include2.jetinc" %>
+Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc
new file mode 100644
index 0000000..75d8420
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/alt2/include2.jetinc
@@ -0,0 +1,4 @@
+This is content from include2.jetinc in alt2.
+7 + 8 = <%= 7 + 8 %>
+<%@include file="include1.jetinc"%>
+Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet
new file mode 100644
index 0000000..264a6bf
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet
@@ -0,0 +1,36 @@
+<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
+--- before failing include with alternative >>>
+<%@include file="include1.fail.jetinc" fail="alternative"%>
+<%@start%>
+ Alternative text to include1.fail.jetinc
+ 2 + 4 = <%= 2 + 4 %>
+ <%@include file="include1.jetinc" fail="alternative"%>
+ <%@start%>
+ Fail alternative for include1.jetinc within fail alternative of include1.fail.jetinc
+ <%@end%>
+ <%@include file="include2.fail.jetinc" fail="alternative"%>
+ <%@start%>
+ Fail alternative for include2.fail.jetinc within fail alternative of include1.fail.jetinc
+ <%@end%>
+<%@end%>
+<<< after include ---
+
+--- before successful include with alternative >>>
+<%@include file="include1.jetinc" fail="alternative"%>
+<%@start%>
+ Alternative text to include1.jetinc - should not be processed
+ 7 + 3 = <%= 7 + 3 %>
+ <%@include file="include2.jetinc" fail="alternative"%>
+ <%@start%>
+ Fail alternative for include2.jetinc within fail alternative of include1.jetinc
+ <%@end%>
+ <%@include file="include2.fail.jetinc" fail="alternative"%>
+ <%@start%>
+ Fail alternative for include2.fail.jetinc within fail alternative of include1.jetinc
+ <%@end%>
+<%@end%>
+<<< after include ---
+
+--- before failing include with alternative >>>
+<%@include file="include1.fail.jetinc" fail="silent"%>
+<<< after include ---
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected
new file mode 100644
index 0000000..f0eef0e
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/alternative.include.javajet.astdump.expected
@@ -0,0 +1,74 @@
+<directive name="jet" line="1" col="1">
+ <attribute name="class">Simple</attribute>
+ <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
+</directive>
+<data>--- before failing include with alternative >>>
+</data>
+<directive name="include" line="3" col="1">
+ <attribute name="file">include1.fail.jetinc</attribute>
+ <attribute name="fail">alternative</attribute>
+</directive>
+<data></data>
+<directive name="start" line="4" col="1">
+</directive>
+<data> Alternative text to include1.fail.jetinc
+ 2 + 4 = </data>
+<expression line="6" col="14"> 2 + 4 </expression>
+<data>
+ </data>
+<directive name="include" line="7" col="3">
+ <attribute name="file">include1.jetinc</attribute>
+ <attribute name="fail">alternative</attribute>
+</directive>
+<included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
+ <data>This is content from include1.jetinc in base.
+3 + 5 = </data>
+ <expression line="2" col="12"> 3 + 5 </expression>
+ <data>
+Done
+</data>
+</included>
+<data> </data>
+<data>
+</data>
+<directive name="include" line="11" col="3">
+ <attribute name="file">include2.fail.jetinc</attribute>
+ <attribute name="fail">alternative</attribute>
+</directive>
+<data></data>
+<directive name="start" line="12" col="3">
+</directive>
+<data> Fail alternative for include2.fail.jetinc within fail alternative of include1.fail.jetinc
+</data>
+<directive name="end" line="14" col="3">
+</directive>
+<data></data>
+<directive name="end" line="15" col="1">
+</directive>
+<data><<< after include ---
+
+--- before successful include with alternative >>>
+</data>
+<directive name="include" line="19" col="1">
+ <attribute name="file">include1.jetinc</attribute>
+ <attribute name="fail">alternative</attribute>
+</directive>
+<included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
+ <data>This is content from include1.jetinc in base.
+3 + 5 = </data>
+ <expression line="2" col="12"> 3 + 5 </expression>
+ <data>
+Done
+</data>
+</included>
+<data>
+<<< after include ---
+
+--- before failing include with alternative >>>
+</data>
+<directive name="include" line="35" col="1">
+ <attribute name="file">include1.fail.jetinc</attribute>
+ <attribute name="fail">silent</attribute>
+</directive>
+<data><<< after include ---
+</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet
new file mode 100644
index 0000000..2a9764f
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet
@@ -0,0 +1,4 @@
+<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
+--- before include >>>
+<%@include file="include2.jetinc"%>
+<<< after include ---
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected
new file mode 100644
index 0000000..88b4247
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/complex.include.javajet.astdump.expected
@@ -0,0 +1,49 @@
+<directive name="jet" line="1" col="1">
+ <attribute name="class">Simple</attribute>
+ <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
+</directive>
+<data>--- before include >>>
+</data>
+<directive name="include" line="3" col="1">
+ <attribute name="file">include2.jetinc</attribute>
+</directive>
+<included templatePath="include2.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
+ <data>This is content from include2.jetinc in base.
+</data>
+ <directive name="include" line="2" col="1">
+ <attribute name="file">include2.jetinc</attribute>
+ </directive>
+ <included templatePath="include2.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/alt1/">
+ <data>This is content from include2.jetinc in alt1.
+</data>
+ <directive name="include" line="2" col="1">
+ <attribute name="file">include2.jetinc</attribute>
+ </directive>
+ <included templatePath="include2.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/alt2/">
+ <data>This is content from include2.jetinc in alt2.
+7 + 8 = </data>
+ <expression line="2" col="12"> 7 + 8 </expression>
+ <data>
+</data>
+ <directive name="include" line="3" col="1">
+ <attribute name="file">include1.jetinc</attribute>
+ </directive>
+ <included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
+ <data>This is content from include1.jetinc in base.
+3 + 5 = </data>
+ <expression line="2" col="12"> 3 + 5 </expression>
+ <data>
+Done
+</data>
+ </included>
+ <data>Done
+</data>
+ </included>
+ <data>Done
+</data>
+ </included>
+ <data>Done
+</data>
+</included>
+<data><<< after include ---
+</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc
new file mode 100644
index 0000000..ef24377
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include1.jetinc
@@ -0,0 +1,3 @@
+This is content from include1.jetinc in base.
+3 + 5 = <%= 3 + 5 %>
+Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc
new file mode 100644
index 0000000..230b451
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/include2.jetinc
@@ -0,0 +1,3 @@
+This is content from include2.jetinc in base.
+<%@ include file="include2.jetinc" %>
+Done
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet
new file mode 100644
index 0000000..80803f6
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet
@@ -0,0 +1,4 @@
+<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
+--- before include >>>
+<%@include file="include1.jetinc"%>
+<<< after include ---
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected
new file mode 100644
index 0000000..6051345
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.astdump.expected
@@ -0,0 +1,19 @@
+<directive name="jet" line="1" col="1">
+ <attribute name="class">Simple</attribute>
+ <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
+</directive>
+<data>--- before include >>>
+</data>
+<directive name="include" line="3" col="1">
+ <attribute name="file">include1.jetinc</attribute>
+</directive>
+<included templatePath="include1.jetinc" baseLocation="platform:/plugin/org.eclipse.jet.tests.core/data/parser/v1/base/">
+ <data>This is content from include1.jetinc in base.
+3 + 5 = </data>
+ <expression line="2" col="12"> 3 + 5 </expression>
+ <data>
+Done
+</data>
+</included>
+<data><<< after include ---
+</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected
new file mode 100644
index 0000000..ff45607
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.include.javajet.chararray.astdump.expected
@@ -0,0 +1,11 @@
+<directive name="jet" line="1" col="1">
+ <attribute name="class">Simple</attribute>
+ <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
+</directive>
+<data>--- before include >>>
+</data>
+<directive name="include" line="3" col="1">
+ <attribute name="file">include1.jetinc</attribute>
+</directive>
+<data><<< after include ---
+</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet
new file mode 100644
index 0000000..b910599
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet
@@ -0,0 +1,9 @@
+<%@jet class="Simple" package="org.eclipse.jet.tests.tools.tempates" %>
+--- before scriptlet >>>
+<%
+// This is a scriptlet
+String value = "World";
+%>
+<<< after scriptlet ---
+
+Hello <%= value %>!
diff --git a/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected
new file mode 100644
index 0000000..4af00e5
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/parser/v1/base/simple.javajet.astdump.expected
@@ -0,0 +1,16 @@
+<directive name="jet" line="1" col="1">
+ <attribute name="class">Simple</attribute>
+ <attribute name="package">org.eclipse.jet.tests.tools.tempates</attribute>
+</directive>
+<data>--- before scriptlet >>>
+</data>
+<scriptlet line="3" col="3">
+// This is a scriptlet
+String value = "World";
+</scriptlet>
+<data><<< after scriptlet ---
+
+Hello </data>
+<expression line="9" col="10"> value </expression>
+<data>!
+</data>
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt
new file mode 100644
index 0000000..04fabc7
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test3.txt
@@ -0,0 +1 @@
+This is nested/test3.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt
new file mode 100644
index 0000000..e6f09cd
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/templates/base1/nested/test4.txt
@@ -0,0 +1 @@
+This is nested/test4.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt
new file mode 100644
index 0000000..be088ae
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/templates/base1/test1.txt
@@ -0,0 +1 @@
+This is test1.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt b/tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt
new file mode 100644
index 0000000..ebbc1b4
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/templates/base1/test2.txt
@@ -0,0 +1 @@
+This is test2.txt in data/templates/base1. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt b/tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt
new file mode 100644
index 0000000..62f7a19
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/templates/base2/nested/test5.txt
@@ -0,0 +1 @@
+This is nested/test5.txt in data/templates/base2. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt b/tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt
new file mode 100644
index 0000000..9a38f46
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/templates/base2/test1.txt
@@ -0,0 +1 @@
+This is test1.txt in data/templates/base2. \ No newline at end of file
diff --git a/tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt b/tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt
new file mode 100644
index 0000000..c36abf0
--- /dev/null
+++ b/tests/org.eclipse.jet.tests.core/data/templates/base2/test2.txt
@@ -0,0 +1 @@
+This is test2.txt in data/templates/base2. \ No newline at end of file

Back to the top