Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/org.eclipse.jet.tests.core/data/parser/ast')
-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
11 files changed, 87 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"

Back to the top