8000 Merge pull request #16 from nolanw/update-parse-errors · html5lib/html5lib-tests@acaf74d · GitHub
[go: up one dir, main page]

Skip to content

Commit acaf74d

Browse files
committed
Merge pull request #16 from nolanw/update-parse-errors
Update parse errors for tree construction tests to match spec.
2 parents ba88772 + 9add9af commit acaf74d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2849
-1317
lines changed

tree-construction/adoption01.dat

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#data
22
<a><p></a></p>
33
#errors
4+
(1,3): expected-doctype-but-got-start-tag
5+
(1,10): adoption-agency-1.3
46
#document
57
| <html>
68
| <head>
@@ -12,6 +14,8 @@
1214
#data
1315
<a>1<p>2</a>3</p>
1416
#errors
17+
(1,3): expected-doctype-but-got-start-tag
18+
(1,12): adoption-agency-1.3
1519
#document
1620
| <html>
1721
| <head>
@@ -26,6 +30,8 @@
2630
#data
2731
<a>1<button>2</a>3</button>
2832
#errors
33+
(1,3): expected-doctype-but-got-start-tag
34+
(1,17): adoption-agency-1.3
2935
#document
3036
| <html>
3137
| <head>
@@ -40,6 +46,8 @@
4046
#data
4147
<a>1<b>2</a>3</b>
4248
#errors
49+
(1,3): expected-doctype-but-got-start-tag
50+
(1,12): adoption-agency-1.3
4351
#document
4452
| <html>
4553
| <head>
@@ -54,6 +62,9 @@
5462
#data
5563
<a>1<div>2<div>3</a>4</div>5</div>
5664
#errors
65+
(1,3): expected-doctype-but-got-start-tag
66+
(1,20): adoption-agency-1.3
67+
(1,20): adoption-agency-1.3
5768
#document
5869
| <html>
5970
| <head>
@@ -72,6 +83,16 @@
7283
#data
7384
<table><a>1<p>2</a>3</p>
7485
#errors
86+
(1,7): expected-doctype-but-got-start-tag
87+
(1,10): unexpected-start-tag-implies-table-voodoo
88+
(1,11): unexpected-character-implies-table-voodoo
89+
(1,14): unexpected-start-tag-implies-table-voodoo
90+
(1,15): unexpected-character-implies-table-voodoo
91+
(1,19): unexpected-end-tag-implies-table-voodoo
92+
(1,19): adoption-agency-1.3
93+
(1,20): unexpected-character-implies-table-voodoo
94+
(1,24): unexpected-end-tag-implies-table-voodoo
95+
(1,24): eof-in-table
7596
#document
7697
| <html>
7798
| <head>
@@ -87,6 +108,9 @@
87108
#data
88109
<b><b><a><p></a>
89110
#errors
111+
(1,3): expected-doctype-but-got-start-tag
112+
(1,16): adoption-agency-1.3
113+
(1,16): expected-closing-tag-but-got-eof
90114
#document
91115
| <html>
92116
| <head>
@@ -100,6 +124,9 @@
100124
#data
101125
<b><a><b><p></a>
102126
#errors
127+
(1,3): expected-doctype-but-got-start-tag
128+
(1,16): adoption-agency-1.3
129+
(1,16): expected-closing-tag-but-got-eof
103130
#document
104131
| <html>
105132
| <head>
@@ -114,6 +141,9 @@
114141
#data
115142
<a><b><b><p></a>
116143
#errors
144+
(1,3): expected-doctype-but-got-start-tag
145+
(1,16): adoption-agency-1.3
146+
(1,16): expected-closing-tag-but-got-eof
117147
#document
118148
| <html>
119149
| <head>
@@ -129,6 +159,9 @@
129159
#data
130160
<p>1<s id="A">2<b id="B">3</p>4</s>5</b>
131161
#errors
162+
(1,3): expected-doctype-but-got-start-tag
163+
(1,30): unexpected-end-tag
164+
(1,35): adoption-agency-1.3
132165
#document
133166
| <html>
134167
| <head>
@@ -153,6 +186,11 @@
153186
#data
154187
<table><a>1<td>2</td>3</table>
155188
#errors
189+
(1,7): expected-doctype-but-got-start-tag
190+
(1,10): unexpected-start-tag-implies-table-voodoo
191+
(1,11): unexpected-character-implies-table-voodoo
192+
(1,15): unexpected-cell-in-table-body
193+
(1,30): unexpected-implied-end-tag-in-table-view
156194
#document
157195
| <html>
158196
| <head>
@@ -170,6 +208,10 @@
170208
#data
171209
<table>A<td>B</td>C</table>
172210
#errors
211+
(1,7): expected-doctype-but-got-start-tag
212+
(1,8): unexpected-character-implies-table-voodoo
213+
(1,12): unexpected-cell-in-table-body
214+
(1,22): unexpected-character-implies-table-voodoo
173215
#document
174216
| <html>
175217
| <head>
@@ -184,6 +226,9 @@
184226
#data
185227
<a><svg><tr><input></a>
186228
#errors
229+
(1,3): expected-doctype-but-got-start-tag
230+
(1,23): unexpected-end-tag
231+
(1,23): adoption-agency-1.3
187232
#document
188233
| <html>
189234
| <head>
@@ -196,6 +241,16 @@
196241
#data
197242
<div><a><b><div><div><div><div><div><div><div><div><div><div></a>
198243
#errors
244+
(1,5): expected-doctype-but-got-start-tag
245+
(1,65): adoption-agency-1.3
246+
(1,65): adoption-agency-1.3
247+
(1,65): adoption-agency-1.3
248+
(1,65): adoption-agency-1.3
249+
(1,65): adoption-agency-1.3
250+
(1,65): adoption-agency-1.3
251+
(1,65): adoption-agency-1.3
252+
(1,65): adoption-agency-1.3
253+
(1,65): expected-closing-tag-but-got-eof
199254
#document
200255
| <html>
201256
| <head>
@@ -226,6 +281,9 @@
226281
#data
227282
<div><a><b><u><i><code><div></a>
228283
#errors
284+
(1,5): expected-doctype-but-got-start-tag
285+
(1,32): adoption-agency-1.3
286+
(1,32): expected-closing-tag-but-got-eof
229287
#document
230288
| <html>
231289
| <head>
@@ -245,6 +303,7 @@
245303
#data
246304
<b><b><b><b>x</b></b></b></b>y
247305
#errors
306+
(1,3): expected-doctype-but-got-start-tag
248307
#document
249308
| <html>
250309
| <head>
@@ -259,6 +318,9 @@
259318
#data
260319
<p><b><b><b><b><p>x
261320
#errors
321+
(1,3): expected-doctype-but-got-start-tag
322+
(1,18): unexpected-end-tag
323+
(1,19): expected-closing-tag-but-got-eof
262324
#document
263325
| <html>
264326
| <head>

tree-construction/adoption02.dat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#data
22
<b>1<i>2<p>3</b>4
33
#errors
4+
(1,3): expected-doctype-but-got-start-tag
5+
(1,16): adoption-agency-1.3
6+
(1,17): expected-closing-tag-but-got-eof
47
#document
58
| <html>
69
| <head>
@@ -18,6 +21,11 @@
1821
#data
1922
<a><div><style></style><address><a>
2023
#errors
24+
(1,3): expected-doctype-but-got-start-tag
25+
(1,35): unexpected-start-tag-implies-end-tag
26+
(1,35): adoption-agency-1.3
27+
(1,35): adoption-agency-1.3
28+
(1,35): expected-closing-tag-but-got-eof
2129
#document
2230
| <html>
2331
| <head>

tree-construction/comments01.dat

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#data
22
FOO<!-- BAR -->BAZ
33
#errors
4+
(1,3): expected-doctype-but-got-chars
45
#document
56
| <html>
67
| <head>
@@ -12,6 +13,8 @@ FOO<!-- BAR -->BAZ
1213
#data
1314
FOO<!-- BAR --!>BAZ
1415
#errors
16+
(1,3): expected-doctype-but-got-chars
17+
(1,15): unexpected-bang-after-double-dash-in-comment
1518
#document
1619
| <html>
1720
| <head>
@@ -23,6 +26,9 @@ FOO<!-- BAR --!>BAZ
2326
#data
2427
FOO<!-- BAR -- >BAZ
2528
#errors
29+
(1,3): expected-doctype-but-got-chars
30+
(1,15): unexpected-char-in-comment
31+
(1,21): eof-in-comment
2632
#document
2733
| <html>
2834
| <head>
@@ -33,6 +39,9 @@ FOO<!-- BAR -- >BAZ
3339
#data
3440
FOO<!-- BAR -- <QUX> -- MUX -->BAZ
3541
#errors
42+
(1,3): expected-doctype-but-got-chars
43+
(1,15): unexpected-char-in-comment
44+
(1,24): unexpected-char-in-comment
3645
#document
3746
| <html>
3847
| <head>
@@ -44,6 +53,10 @@ FOO<!-- BAR -- <QUX> -- MUX -->BAZ
4453
#data
4554
FOO<!-- BAR -- <QUX> -- MUX --!>BAZ
4655
#errors
56+
(1,3): expected-doctype-but-got-chars
57+
(1,15): unexpected-char-in-comment
58+
(1,24): unexpected-char-in-comment
59+
(1,31): unexpected-bang-after-double-dash-in-comment
4760
#document
4861
| <html>
4962
| <head>
@@ -55,6 +68,11 @@ FOO<!-- BAR -- <QUX> -- MUX --!>BAZ
5568
#data
5669
FOO<!-- BAR -- <QUX> -- MUX -- >BAZ
5770
#errors
71+
(1,3): expected-doctype-but-got-chars
72+
(1,15): unexpected-char-in-comment
73+
(1,24): unexpected-char-in-comment
74+
(1,31): unexpected-char-in-comment
75+
(1,35): eof-in-comment
5876
#document
5977
| <html>
6078
| <head>
@@ -65,6 +83,7 @@ FOO<!-- BAR -- <QUX> -- MUX -- >BAZ
6583
#data
6684
FOO<!---->BAZ
6785
#errors
86+
(1,3): expected-doctype-but-got-chars
6887
#document
6988
| <html>
7089
| <head>
@@ -76,6 +95,8 @@ FOO<!---->BAZ
7695
#data
7796
FOO<!--->BAZ
7897
#errors
98+
(1,3): expected-doctype-but-got-chars
99+
(1,9): incorrect-comment
79100
#document
80101
| <html>
81102
| <head>
@@ -87,6 +108,8 @@ FOO<!--->BAZ
87108
#data
88109
FOO<!-->BAZ
89110
#errors
111+
(1,3): expected-doctype-but-got-chars
112+
(1,8): incorrect-comment
90113
#document
91114
| <html>
92115
| <head>
@@ -98,6 +121,8 @@ FOO<!-->BAZ
98121
#data
99122
<?xml version="1.0">Hi
100123
#errors
124+
(1,1): expected-tag-name-but-got-question-mark
125+
(1,22): expected-doctype-but-got-chars
101126
#document
102127
| <!-- ?xml version="1.0" -->
103128
| <html>
@@ -108,6 +133,8 @@ FOO<!-->BAZ
108133
#data
109134
<?xml version="1.0">
110135
#errors
136+
(1,1): expected-tag-name-but-got-question-mark
137+
(1,20): expected-doctype-but-got-eof
111138
#document
112139
| <!-- ?xml version="1.0" -->
113140
| <html>
@@ -117,6 +144,8 @@ FOO<!-->BAZ
117144
#data
118145
<?xml version
119146
#errors
147+
(1,1): expected-tag-name-but-got-question-mark
148+
(1,13): expected-doctype-but-got-eof
120149
#document
121150
| <!-- ?xml version -->
122151
| <html>
@@ -126,6 +155,8 @@ FOO<!-->BAZ
126155
#data
127156
FOO<!----->BAZ
128157
#errors
158+
(1,3): expected-doctype-but-got-chars
159+
(1,10): unexpected-dash-after-double-dash-in-comment
129160
#document
130161
| <html>
131162
| <head>
@@ -137,6 +168,7 @@ FOO<!----->BAZ
137168
#data
138169
<html><!-- comment --><title>Comment before head</title>
139170
#errors
171+
(1,6): expected-doctype-but-got-start-tag
140172
#document
141173
| <html>
142174
| <!-- comment -->

0 commit comments

Comments
 (0)
0