Skip to content

Commit 8dedaf0

Browse files
committed
Chore: add tests about eof-in-tag
1 parent 5fcdc50 commit 8dedaf0

File tree

3 files changed

+213
-0
lines changed

3 files changed

+213
-0
lines changed
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
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+
19
28+
],
29+
"loc": {
30+
"start": {
31+
"line": 1,
32+
"column": 0
33+
},
34+
"end": {
35+
"line": 2,
36+
"column": 8
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+
15
65+
],
66+
"loc": {
67+
"start": {
68+
"line": 1,
69+
"column": 10
70+
},
71+
"end": {
72+
"line": 2,
73+
"column": 4
74+
}
75+
},
76+
"value": "\n "
77+
},
78+
{
79+
"type": "VElement",
80+
"range": [
81+
15,
82+
19
83+
],
84+
"loc": {
85+
"start": {
86+
"line": 2,
87+
"column": 4
88+
},
89+
"end": {
90+
"line": 2,
91+
"column": 8
92+
}
93+
},
94+
"name": "div",
95+
"namespace": "http://www.w3.org/1999/xhtml",
96+
"startTag": {
97+
"type": "VStartTag",
98+
"range": [
99+
15,
100+
19
101+
],
102+
"loc": {
103+
"start": {
104+
"line": 2,
105+
"column": 4
106+
},
107+
"end": {
108+
"line": 2,
109+
"column": 8
110+
}
111+
},
112+
"attributes": []
113+
},
114+
"children": [],
115+
"endTag": null,
116+
"variables": []
117+
}
118+
],
119+
"endTag": null,
120+
"variables": [],
121+
"tokens": [
122+
{
123+
"type": "HTMLTagOpen",
124+
"range": [
125+
0,
126+
9
127+
],
128+
"loc": {
129+
"start": {
130+
"line": 1,
131+
"column": 0
132+
},
133+
"end": {
134+
"line": 1,
135+
"column": 9
136+
}
137+
},
138+
"value": "template"
139+
},
140+
{
141+
"type": "HTMLTagClose",
142+
"range": [
143+
9,
144+
10
145+
],
146+
"loc": {
147+
"start": {
148+
"line": 1,
149+
"column": 9
150+
},
151+
"end": {
152+
"line": 1,
153+
"column": 10
154+
}
155+
},
156+
"value": ""
157+
},
158+
{
159+
"type": "HTMLWhitespace",
160+
"range": [
161+
10,
162+
15
163+
],
164+
"loc": {
165+
"start": {
166+
"line": 1,
167+
"column": 10
168+
},
169+
"end": {
170+
"line": 2,
171+
"column": 4
172+
}
173+
},
174+
"value": "\n "
175+
},
176+
{
177+
"type": "HTMLTagOpen",
178+
"range": [
179+
15,
180+
19
181+
],
182+
"loc": {
183+
"start": {
184+
"line": 2,
185+
"column": 4
186+
},
187+
"end": {
188+
"line": 2,
189+
"column": 8
190+
}
191+
},
192+
"value": "div"
193+
}
194+
],
195+
"comments": [],
196+
"errors": [
197+
{
198+
"message": "eof-in-tag (2:8)",
199+
"index": 19,
200+
"lineNumber": 2,
201+
"column": 8
202+
}
203+
]
204+
}
205+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<template>
2+
<div
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
"<template",
3+
">",
4+
"\n ",
5+
"<div"
6+
]

0 commit comments

Comments
 (0)