Skip to content

Commit b508a02

Browse files
committed
add lexer tests for invalid types within 'as' attributes
1 parent 101c32e commit b508a02

File tree

4 files changed

+963
-2
lines changed

4 files changed

+963
-2
lines changed

__tests__/data/as-attributes-to-json-out.json

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,138 @@
7575
[
7676
"test19",
7777
"function(*)"
78+
],
79+
[
80+
"XP4test1",
81+
"record(ssn as xs:string, emp as element(employee))"
82+
],
83+
[
84+
"XP4test2",
85+
"union(xs:dateTime, xs:date, xs:time, xs:string)"
86+
],
87+
[
88+
"XP4test3",
89+
"enum('NFC', 'NFD', 'NFKC', 'NFKD')"
90+
],
91+
[
92+
"XP4test4",
93+
"type(ct:complex)"
94+
],
95+
[
96+
"test1-error",
97+
"xs:intege"
98+
],
99+
[
100+
"test1tvt-error",
101+
"xs:intege"
102+
],
103+
[
104+
"test2-error",
105+
"arrayx(xs:string)"
106+
],
107+
[
108+
"test3-error",
109+
"string"
110+
],
111+
[
112+
"test4-error",
113+
"element('book')"
114+
],
115+
[
116+
"test5-error",
117+
"map(element() xs:integer*)*"
118+
],
119+
[
120+
"test6-error",
121+
""
122+
],
123+
[
124+
"test7-error",
125+
"@name"
126+
],
127+
[
128+
"test8-error",
129+
"element(q:book)"
130+
],
131+
[
132+
"test9-error",
133+
"element('book')"
134+
],
135+
[
136+
"test10-error",
137+
"element(book"
138+
],
139+
[
140+
"test12-error",
141+
"map()"
142+
],
143+
[
144+
"test13-error",
145+
"xs:map(*)"
146+
],
147+
[
148+
"test15-error",
149+
"array( )"
150+
],
151+
[
152+
"test16-error",
153+
"array()"
154+
],
155+
[
156+
"test17-error",
157+
"map( )"
158+
],
159+
[
160+
"test18-error",
161+
"map(xs:integer, xs:integer, xs:integer)"
162+
],
163+
[
164+
"test19-error",
165+
"array(xs:integer, xs:integer)"
166+
],
167+
[
168+
"test20-error",
169+
"attribute(*, xs:date, xs:integer)"
170+
],
171+
[
172+
"test21-error",
173+
"element(*, xs:date, xs:integer)"
174+
],
175+
[
176+
"test22-error",
177+
"as xs:integer"
178+
],
179+
[
180+
"test23-error",
181+
"array(as)"
182+
],
183+
[
184+
"test24-error",
185+
"array(*) as"
186+
],
187+
[
188+
"test25-error",
189+
"as array(*)"
190+
],
191+
[
192+
"test27-error",
193+
"function(book, library)"
194+
],
195+
[
196+
"test29-error",
197+
"element(?)"
198+
],
199+
[
200+
"test30-error",
201+
"element(..)?"
202+
],
203+
[
204+
"test31-error",
205+
"function()"
206+
],
207+
[
208+
"test32-error",
209+
"element()()"
78210
]
79211
],
80212
"descriptor": "XPath Lexer: tokens created within the XSLT 'as' attribute",

0 commit comments

Comments
 (0)