Skip to content

Commit b14b268

Browse files
committed
Chore: add tests about invalid-first-character-of-tag-name
1 parent 5af6621 commit b14b268

File tree

3 files changed

+266
-0
lines changed

3 files changed

+266
-0
lines changed
Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
{
2+
"type": "Program",
3+
"start": 0,
4+
"end": 0,
5+
"loc": {
6+
"start": {
7+
"line": 1,
8+
"column": 0
9+
},
10+
"end": {
11+
"line": 1,
12+
"column": 0
13+
}
14+
},
15+
"range": [
16+
0,
17+
0
18+
],
19+
"body": [],
20+
"sourceType": "script",
21+
"comments": [],
22+
"tokens": [],
23+
"templateBody": {
24+
"type": "VElement",
25+
"range": [
26+
0,
27+
31
28+
],
29+
"loc": {
30+
"start": {
31+
"line": 1,
32+
"column": 0
33+
},
34+
"end": {
35+
"line": 3,
36+
"column": 11
37+
}
38+
},
39+
"name": "template",
40+
"namespace": "http://www.w3.org/1999/xhtml",
41+
"startTag": {
42+
"type": "VStartTag",
43+
"range": [
44+
0,
45+
10
46+
],
47+
"loc": {
48+
"start": {
49+
"line": 1,
50+
"column": 0
51+
},
52+
"end": {
53+
"line": 1,
54+
"column": 10
55+
}
56+
},
57+
"attributes": []
58+
},
59+
"children": [
60+
{
61+
"type": "VText",
62+
"range": [
63+
10,
64+
20
65+
],
66+
"loc": {
67+
"start": {
68+
"line": 1,
69+
"column": 10
70+
},
71+
"end": {
72+
"line": 3,
73+
"column": 0
74+
}
75+
},
76+
"value": "\n <👍>\n"
77+
}
78+
],
79+
"endTag": {
80+
"type": "VEndTag",
81+
"range": [
82+
20,
83+
31
84+
],
85+
"loc": {
86+
"start": {
87+
"line": 3,
88+
"column": 0
89+
},
90+
"end": {
91+
"line": 3,
92+
"column": 11
93+
}
94+
}
95+
},
96+
"variables": [],
97+
"tokens": [
98+
{
99+
"type": "HTMLTagOpen",
100+
"range": [
101+
0,
102+
9
103+
],
104+
"loc": {
105+
"start": {
106+
"line": 1,
107+
"column": 0
108+
},
109+
"end": {
110+
"line": 1,
111+
"column": 9
112+
}
113+
},
114+
"value": "template"
115+
},
116+
{
117+
"type": "HTMLTagClose",
118+
"range": [
119+
9,
120+
10
121+
],
122+
"loc": {
123+
"start": {
124+
"line": 1,
125+
"column": 9
126+
},
127+
"end": {
128+
"line": 1,
129+
"column": 10
130+
}
131+
},
132+
"value": ""
133+
},
134+
{
135+
"type": "HTMLWhitespace",
136+
"range": [
137+
10,
138+
15
139+
],
140+
"loc": {
141+
"start": {
142+
"line": 1,
143+
"column": 10
144+
},
145+
"end": {
146+
"line": 2,
147+
"column": 4
148+
}
149+
},
150+
"value": "\n "
151+
},
152+
{
153+
"type": "HTMLText",
154+
"range": [
155+
15,
156+
19
157+
],
158+
"loc": {
159+
"start": {
160+
"line": 2,
161+
"column": 4
162+
},
163+
"end": {
164+
"line": 2,
165+
"column": 8
166+
}
167+
},
168+
"value": "<👍>"
169+
},
170+
{
171+
"type": "HTMLWhitespace",
172+
"range": [
173+
19,
174+
20
175+
],
176+
"loc": {
177+
"start": {
178+
"line": 2,
179+
"column": 8
180+
},
181+
"end": {
182+
"line": 3,
183+
"column": 0
184+
}
185+
},
186+
"value": "\n"
187+
},
188+
{
189+
"type": "HTMLEndTagOpen",
190+
"range": [
191+
20,
192+
30
193+
],
194+
"loc": {
195+
"start": {
196+
"line": 3,
197+
"column": 0
198+
},
199+
"end": {
200+
"line": 3,
201+
"column": 10
202+
}
203+
},
204+
"value": "template"
205+
},
206+
{
207+
"type": "HTMLTagClose",
208+
"range": [
209+
30,
210+
31
211+
],
212+
"loc": {
213+
"start": {
214+
"line": 3,
215+
"column": 10
216+
},
217+
"end": {
218+
"line": 3,
219+
"column": 11
220+
}
221+
},
222+
"value": ""
223+
},
224+
{
225+
"type": "HTMLWhitespace",
226+
"range": [
227+
31,
228+
32
229+
],
230+
"loc": {
231+
"start": {
232+
"line": 3,
233+
"column": 11
234+
},
235+
"end": {
236+
"line": 4,
237+
"column": 0
238+
}
239+
},
240+
"value": "\n"
241+
}
242+
],
243+
"comments": [],
244+
"errors": [
245+
{
246+
"message": "invalid-first-character-of-tag-name (2:5)",
247+
"index": 16,
248+
"lineNumber": 2,
249+
"column": 5
250+
}
251+
]
252+
}
253+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<👍>
3+
</template>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[
2+
"<template",
3+
">",
4+
"\n ",
5+
"<👍>",
6+
"\n",
7+
"</template",
8+
">",
9+
"\n"
10+
]

0 commit comments

Comments
 (0)