/[suikacvs]/markup/html/whatpm/t/tokenizer-test-1.test
Suika

Diff of /markup/html/whatpm/t/tokenizer-test-1.test

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by wakaba, Sat Jun 23 03:53:35 2007 UTC revision 1.34 by wakaba, Sat Sep 5 09:57:56 2009 UTC
# Line 1  Line 1 
1  {"tests": [  {"tests": [
2    
3  {"description":"<!DOCTYPE",  {"description":"<!DOCTYPE (HTML5 revision 3121)",
4  "input":"<!DOCTYPE",  "input":"<!DOCTYPE",
5  "output":["ParseError","ParseError",["DOCTYPE", "", true]]},  "output":["ParseError",["DOCTYPE", null, null, null, false]]},
6    
7  {"description":"<!DOCTYPE ",  {"description":"<!DOCTYPE ",
8  "input":"<!DOCTYPE ",  "input":"<!DOCTYPE ",
9  "output":["ParseError",["DOCTYPE", "", true]]},  "output":["ParseError",["DOCTYPE", null, null, null, false]]},
10    
11  {"description":"<!DOCTYPE >",  {"description":"<!DOCTYPE >",
12  "input":"<!DOCTYPE >",  "input":"<!DOCTYPE >",
13  "output":["ParseError",["DOCTYPE", "", true]]},  "output":["ParseError",["DOCTYPE", null, null, null, false]]},
14    
15  {"description":"<!DOCTYPE h",  {"description":"<!DOCTYPE h",
16  "input":"<!DOCTYPE h",  "input":"<!DOCTYPE h",
17  "output":["ParseError",["DOCTYPE", "H", true]]},  "output":["ParseError",["DOCTYPE", "h", null, null, false]]},
18    
19  {"description":"<!DOCTYPE H",  {"description":"<!DOCTYPE H",
20  "input":"<!DOCTYPE H",  "input":"<!DOCTYPE H",
21  "output":["ParseError",["DOCTYPE", "H", true]]},  "output":["ParseError",["DOCTYPE", "h", null, null, false]]},
22    
23  {"description":"<!DOCTYPE h>",  {"description":"<!DOCTYPE h>",
24  "input":"<!DOCTYPE h>",  "input":"<!DOCTYPE h>",
25  "output":[["DOCTYPE", "H", true]]},  "output":[["DOCTYPE", "h", null, null, true]]},
26    
27  {"description":"<!DOCTYPE H>",  {"description":"<!DOCTYPE H>",
28  "input":"<!DOCTYPE H>",  "input":"<!DOCTYPE H>",
29  "output":[["DOCTYPE", "H", true]]},  "output":[["DOCTYPE", "h", null, null, true]]},
30    
31  {"description":"<!DOCTYPE ht",  {"description":"<!DOCTYPE ht",
32  "input":"<!DOCTYPE ht",  "input":"<!DOCTYPE ht",
33  "output":["ParseError",["DOCTYPE", "HT", true]]},  "output":["ParseError",["DOCTYPE", "ht", null, null, false]]},
34    
35  {"description":"<!DOCTYPE Ht",  {"description":"<!DOCTYPE Ht",
36  "input":"<!DOCTYPE Ht",  "input":"<!DOCTYPE Ht",
37  "output":["ParseError",["DOCTYPE", "HT", true]]},  "output":["ParseError",["DOCTYPE", "ht", null, null, false]]},
38    
39  {"description":"<!DOCTYPE hT",  {"description":"<!DOCTYPE hT",
40  "input":"<!DOCTYPE hT",  "input":"<!DOCTYPE hT",
41  "output":["ParseError",["DOCTYPE", "HT", true]]},  "output":["ParseError",["DOCTYPE", "ht", null, null, false]]},
42    
43  {"description":"<!DOCTYPE ht>",  {"description":"<!DOCTYPE ht>",
44  "input":"<!DOCTYPE ht>",  "input":"<!DOCTYPE ht>",
45  "output":[["DOCTYPE", "HT", true]]},  "output":[["DOCTYPE", "ht", null, null, true]]},
46    
47  {"description":"<!DOCTYPE Ht>",  {"description":"<!DOCTYPE Ht>",
48  "input":"<!DOCTYPE Ht>",  "input":"<!DOCTYPE Ht>",
49  "output":[["DOCTYPE", "HT", true]]},  "output":[["DOCTYPE", "ht", null, null, true]]},
50    
51  {"description":"<!DOCTYPE hT>",  {"description":"<!DOCTYPE hT>",
52  "input":"<!DOCTYPE hT>",  "input":"<!DOCTYPE hT>",
53  "output":[["DOCTYPE", "HT", true]]},  "output":[["DOCTYPE", "ht", null, null, true]]},
54    
55  {"description":"<!DOCTYPE hT>",  {"description":"<!DOCTYPE hT>",
56  "input":"<!DOCTYPE hT>",  "input":"<!DOCTYPE hT>",
57  "output":[["DOCTYPE", "HT", true]]},  "output":[["DOCTYPE", "ht", null, null, true]]},
58    
59  {"description":"<!DOCTYPE htm",  {"description":"<!DOCTYPE htm",
60  "input":"<!DOCTYPE htm",  "input":"<!DOCTYPE htm",
61  "output":["ParseError",["DOCTYPE", "HTM", true]]},  "output":["ParseError",["DOCTYPE", "htm", null, null, false]]},
62    
63  {"description":"<!DOCTYPE Htm",  {"description":"<!DOCTYPE Htm",
64  "input":"<!DOCTYPE Htm",  "input":"<!DOCTYPE Htm",
65  "output":["ParseError",["DOCTYPE", "HTM", true]]},  "output":["ParseError",["DOCTYPE", "htm", null, null, false]]},
66    
67  {"description":"<!DOCTYPE hTM",  {"description":"<!DOCTYPE hTM",
68  "input":"<!DOCTYPE hTM",  "input":"<!DOCTYPE hTM",
69  "output":["ParseError",["DOCTYPE", "HTM", true]]},  "output":["ParseError",["DOCTYPE", "htm", null, null, false]]},
70    
71  {"description":"<!DOCTYPE htm>",  {"description":"<!DOCTYPE htm>",
72  "input":"<!DOCTYPE htm>",  "input":"<!DOCTYPE htm>",
73  "output":[["DOCTYPE", "HTM", true]]},  "output":[["DOCTYPE", "htm", null, null, true]]},
74    
75  {"description":"<!DOCTYPE Htm>",  {"description":"<!DOCTYPE Htm>",
76  "input":"<!DOCTYPE Htm>",  "input":"<!DOCTYPE Htm>",
77  "output":[["DOCTYPE", "HTM", true]]},  "output":[["DOCTYPE", "htm", null, null, true]]},
78    
79  {"description":"<!DOCTYPE hTM>",  {"description":"<!DOCTYPE hTM>",
80  "input":"<!DOCTYPE hTM>",  "input":"<!DOCTYPE hTM>",
81  "output":[["DOCTYPE", "HTM", true]]},  "output":[["DOCTYPE", "htm", null, null, true]]},
82    
83  {"description":"<!DOCTYPE html5",  {"description":"<!DOCTYPE html5",
84  "input":"<!DOCTYPE html5",  "input":"<!DOCTYPE html5",
85  "output":["ParseError",["DOCTYPE", "HTML5", true]]},  "output":["ParseError",["DOCTYPE", "html5", null, null, false]]},
86    
87  {"description":"<!DOCTYPE html5>",  {"description":"<!DOCTYPE html5>",
88  "input":"<!DOCTYPE html5>",  "input":"<!DOCTYPE html5>",
89  "output":[["DOCTYPE", "HTML5", true]]},  "output":[["DOCTYPE", "html5", null, null, true]]},
90    
91    {"description": "VT in DOCTYPE state",
92    "input": "<!DOCTYPE\u000b html>",
93    "output": ["ParseError", "ParseError",
94              ["DOCTYPE", "\u000b", null, null, false]]},
95    
96    {"description": "VT in before DOCTYPE name state",
97    "input": "<!DOCTYPE \u000bhtml>",
98    "output": [["DOCTYPE", "\u000bhtml", null, null, true]]},
99    
100    {"description": "VT in DOCTYPE name state",
101    "input": "<!DOCTYPE html\u000babcd>",
102    "output": [["DOCTYPE", "html\u000babcd", null, null, true]]},
103    
104    {"description": "VT in after DOCTYPE name state",
105    "input": "<!DOCTYPE html \u000b>",
106    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
107    
108    {"description": "VT in before DOCTYPE public identifier state",
109    "input": "<!DOCTYPE html PUBLIC \u000b\"xx\">",
110    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
111    
112    {"description": "VT in after DOCTYPE public identifier state",
113    "input": "<!DOCTYPE html PUBLIC \"x\"\u000b>",
114    "output": ["ParseError", ["DOCTYPE", "html", "x", null, false]]},
115    
116    {"description": "VT in before DOCTYPE system identifier state",
117    "input": "<!DOCTYPE html SYSTEM \u000b\"aa\">",
118    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
119    
120    {"description": "VT in after DOCTYPE system identifier state",
121    "input": "<!DOCTYPE html SYSTEM \"a\"\u000b>",
122    "output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]},
123    
124    {"description":"PUBLIC\u0022\u0022",
125    "input":"<!DOCTYPE html PUBLIC\u0022\u0022>",
126    "output":[["DOCTYPE", "html", "", null, true]]},
127    
128    {"description":"PUBLIC''",
129    "input":"<!DOCTYPE html PUBLIC''>",
130    "output":[["DOCTYPE", "html", "", null, true]]},
131    
132    {"description":"PUBLICbogus",
133    "input":"<!DOCTYPE html PUBLICbogus>",
134    "output":["ParseError",["DOCTYPE", "html", null, null, false]]},
135    
136    {"description":"PUBLIC bogus",
137    "input":"<!DOCTYPE html PUBLIC bogus>",
138    "output":["ParseError",["DOCTYPE", "html", null, null, false]]},
139    
140    {"description":"PUBLIC \u0022\u0022bogus",
141    "input":"<!DOCTYPE html PUBLIC \u0022\u0022bogus>",
142    "output":["ParseError",["DOCTYPE", "html", "", null, false]]},
143    
144    {"description":"PUBLIC \u0022\u0022 bogus",
145    "input":"<!DOCTYPE html PUBLIC \u0022\u0022 bogus>",
146    "output":["ParseError",["DOCTYPE", "html", "", null, false]]},
147    
148    {"description":"PUBLIC \u0022\u0022 \u0022\u0022bogus",
149    "input":"<!DOCTYPE html PUBLIC \u0022\u0022 \u0022\u0022bogus>",
150    "output":["ParseError",["DOCTYPE", "html", "", "", true]]},
151    
152    {"description":"PUBLIC \u0022\u0022 \u0022\u0022 bogus",
153    "input":"<!DOCTYPE html PUBLIC \u0022\u0022 \u0022\u0022 bogus>",
154    "output":["ParseError",["DOCTYPE", "html", "", "", true]]},
155    
156    {"description":"PUBLIC \u0022\u0022\u0022\u0022>",
157    "input":"<!DOCTYPE html PUBLIC \u0022\u0022\u0022\u0022>",
158    "output":[["DOCTYPE", "html", "", "", true]]},
159    
160    {"description":"PUBLIC \u0022\u0022''>",
161    "input":"<!DOCTYPE html PUBLIC \u0022\u0022''>",
162    "output":[["DOCTYPE", "html", "", "", true]]},
163    
164    {"description":"SYSTEM a",
165    "input":"<!DOCTYPE html SYSTEM a>",
166    "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
167    
168    {"description": "garbage after SYSTEM literal",
169    "input": "<!DOCTYPE html SYSTEM 'a' b>",
170    "output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]},
171    
172    {"description": "garbage after PUBLIC and SYSTEM literal",
173    "input": "<!DOCTYPE html PUBLIC 'c' 'a' b>",
174    "output": ["ParseError", ["DOCTYPE", "html", "c", "a", true]]},
175    
176    {"description": "garbage immediately after SYSTEM literal",
177    "input": "<!DOCTYPE html SYSTEM 'a'b>",
178    "output": ["ParseError", ["DOCTYPE", "html", null, "a", true]]},
179    
180    {"description": "garbage immediately after PUBLIC and SYSTEM literal",
181    "input": "<!DOCTYPE html PUBLIC 'c' 'a'b>",
182    "output": ["ParseError", ["DOCTYPE", "html", "c", "a", true]]},
183    
184    {"description": "DOCTYPe",
185    "input": "<!DOCTYPe html>",
186    "output": [["DOCTYPE", "html", null, null, true]]},
187    
188    {"description": "DOCTYPE Html",
189    "input": "<!DOCTYPE Html>",
190    "output": [["DOCTYPE", "html", null, null, true]]},
191    
192    {"description": "DOCTYPE hTml",
193    "input": "<!DOCTYPE Html>",
194    "output": [["DOCTYPE", "html", null, null, true]]},
195    
196    {"description": "PUBLIc",
197    "input": "<!DOCTYPE html PUBLIc 'a' 'b'>",
198    "output": [["DOCTYPE", "html", "a", "b", true]]},
199    
200    {"description": "SYSTEm",
201    "input": "<!DOCTYPE html SYSTEm 'a'>",
202    "output": [["DOCTYPE", "html", null, "a", true]]},
203    
204    {"description": "<!D>",
205    "input": "<!D>",
206    "output": ["ParseError", ["Comment", "D"]]},
207    
208    {"description": "<!DO>",
209    "input": "<!DO>",
210    "output": ["ParseError", ["Comment", "DO"]]},
211    
212    {"description": "<!DOc>",
213    "input": "<!DOc>",
214    "output": ["ParseError", ["Comment", "DOc"]]},
215    
216    {"description": "<!dOcT>",
217    "input": "<!dOcT>",
218    "output": ["ParseError", ["Comment", "dOcT"]]},
219    
220    {"description": "<!DoctY",
221    "input": "<!DoctY",
222    "output": ["ParseError", ["Comment", "DoctY"]]},
223    
224    {"description": "<!doctyp!>",
225    "input": "<!doctyp!>",
226    "output": ["ParseError", ["Comment", "doctyp!"]]},
227    
228    {"description": "<!Doc?>",
229    "input": "<!Doc?>",
230    "output": ["ParseError", ["Comment", "Doc?"]]},
231    
232    {"description": "<!Doc<type>>",
233    "input": "<!Doc<type>>",
234    "output": ["ParseError", ["Comment", "Doc<type"], ["Character", ">"]]},
235    
236    {"description": "<!DOCTYPE HTML P>",
237    "input": "<!DOCTYPE HTML P>",
238    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
239    
240    {"description": "<!DOCTYPE HTML Pa>",
241    "input": "<!DOCTYPE HTML Pa>",
242    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
243    
244    {"description": "<!DOCTYPE HTML Pua>",
245    "input": "<!DOCTYPE HTML Pua>",
246    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
247    
248    {"description": "<!DOCTYPE HTML PUB>",
249    "input": "<!DOCTYPE HTML PUB>",
250    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
251    
252    {"description": "<!DOCTYPE HTML pubL>",
253    "input": "<!DOCTYPE HTML pubL>",
254    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
255    
256    {"description": "<!DOCTYPE HTML publication>",
257    "input": "<!DOCTYPE HTML publication>",
258    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
259    
260    {"description": "<!DOCTYPE HTML publi>",
261    "input": "<!DOCTYPE HTML publi>",
262    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
263    
264    {"description": "<!DOCTYPE HTML PULICID>",
265    "input": "<!DOCTYPE HTML PUBLICID>",
266    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
267    
268    {"description": "<!DOCTYPE HTML S ''>",
269    "input": "<!DOCTYPE HTML S ''>",
270    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
271    
272    {"description": "<!DOCTYPE HTML sy>",
273    "input": "<!DOCTYPE HTML sy>",
274    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
275    
276    {"description": "<!DOCTYPE HTML sys ''>",
277    "input": "<!DOCTYPE HTML sys ''>",
278    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
279    
280    {"description": "<!DOCTYPE HTML syst>",
281    "input": "<!DOCTYPE HTML syst>",
282    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
283    
284    {"description": "<!DOCTYPE HTML SySter>",
285    "input": "<!DOCTYPE HTML SySter>",
286    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
287    
288    {"description": "<!DOCTYPE HTML systemid>",
289    "input": "<!DOCTYPE HTML systemid>",
290    "output": ["ParseError", ["DOCTYPE", "html", null, null, false]]},
291    
292    {"description":"<!---x-->",
293    "input":"<!---x-->",
294    "output":[["Comment", "-x"]]},
295    
296    {"description":"<!----x-->",
297    "input":"<!----x-->",
298    "output":["ParseError", ["Comment", "--x"]]},
299    
300  {"description":"non-PCDATA content model flag, start tag-like string",  {"description":"non-PCDATA content model flag, start tag-like string",
301  "contentModelFlags":["PLAINTEXT","RCDATA","CDATA"],  "contentModelFlags":["PLAINTEXT","RCDATA","CDATA"],
# Line 99  Line 308 
308  "input":"AB</xxx>CD",  "input":"AB</xxx>CD",
309  "output":[["Character", "AB"],["EndTag", "xxx"],["Character", "CD"]]},  "output":[["Character", "AB"],["EndTag", "xxx"],["Character", "CD"]]},
310    
311    {"description":"NULL character reference",
312    "input":"&#0;",
313    "output":["ParseError", ["Character", "\uFFFD"]]},
314    
315    {"description":"NULL character reference",
316    "input":"&#x0;",
317    "output":["ParseError", ["Character", "\uFFFD"]]},
318    
319    {"description": "U+0001 character reference",
320    "input": "&#x1;",
321    "output": ["ParseError", ["Character", "\uFFFD"]]},
322    
323    {"description": "U+0002 character reference",
324    "input": "&#x2;",
325    "output": ["ParseError", ["Character", "\uFFFD"]]},
326    
327    {"description": "U+0008 character reference",
328    "input": "&#x8;",
329    "output": ["ParseError", ["Character", "\uFFFD"]]},
330    
331    {"description": "U+0008 decimal character reference",
332    "input": "&#8;",
333    "output": ["ParseError", ["Character", "\uFFFD"]]},
334    
335    {"description": "U+0009 character reference",
336    "input": "&#x9;",
337    "output": [["Character", "\u0009"]]},
338    
339    {"description": "U+000A character reference",
340    "input": "&#xa;",
341    "output": [["Character", "\u000A"]]},
342    
343    {"description":"character entity &#13;",
344    "input":"&#13;",
345    "output":["ParseError", ["Character", "\u000A"]]},
346    
347    {"description":"character entity &#xd;",
348    "input":"&#xd;",
349    "output":["ParseError", ["Character", "\u000A"]]},
350    
351    {"description":"character entities &#13;&#10;",
352    "input":"&#13;&#10;",
353    "output":["ParseError", ["Character", "\u000A\u000A"]]},
354    
355    {"description":"character entity &#13; followed by a LF",
356    "input":"&#13;\u000A",
357    "output":["ParseError", ["Character", "\u000A\u000A"]]},
358    
359    {"description": "U+000B character reference",
360    "input": "&#xb;",
361    "output": ["ParseError", ["Character", "\uFFFD"]]},
362    
363    {"description": "U+000B decimal character reference",
364    "input": "&#11;",
365    "output": ["ParseError", ["Character", "\uFFFD"]]},
366    
367    {"description": "U+000C character reference",
368    "input": "&#xc;",
369    "output": [["Character", "\u000C"]]},
370    
371    {"description": "U+000E character reference",
372    "input": "&#xe;",
373    "output": ["ParseError", ["Character", "\uFFFD"]]},
374    
375    {"description": "U+000F character reference",
376    "input": "&#xF;",
377    "output": ["ParseError", ["Character", "\uFFFD"]]},
378    
379    {"description": "U+000F decimal character reference",
380    "input": "&#15;",
381    "output": ["ParseError", ["Character", "\uFFFD"]]},
382    
383    {"description": "U+0010 character reference",
384    "input": "&#x10;",
385    "output": ["ParseError", ["Character", "\uFFFD"]]},
386    
387    {"description": "U+001B character reference",
388    "input": "&#x1b;",
389    "output": ["ParseError", ["Character", "\uFFFD"]]},
390    
391    {"description": "U+001F character reference",
392    "input": "&#x1F;",
393    "output": ["ParseError", ["Character", "\uFFFD"]]},
394    
395    {"description": "U+0020 character reference",
396    "input": "&#x20;",
397    "output": [["Character", " "]]},
398    
399    {"description": "U+007F character reference",
400    "input": "&#x7f;",
401    "output": ["ParseError", ["Character", "\uFFFD"]]},
402    
403  {"description":"c1 character references",  {"description":"c1 character references",
404  "input":"&#128;&#129;&#130;&#131;&#132;&#133;&#134;&#135;",  "input":"&#128;&#129;&#130;&#131;&#132;&#133;&#134;&#135;",
405  "output":[  "output":[
# Line 197  Line 498 
498    "ParseError", ["Character", "\u0178"]    "ParseError", ["Character", "\u0178"]
499  ]},  ]},
500    
501    {"description":"Numeric entity representing a Windows-1252 'codepoint'",
502    "input":"&#137;",
503    "output":["ParseError", ["Character", "\u2030"]]},
504    
505    {"description":"Hexadecimal entity representing a Windows-1252 'codepoint'",
506    "input":"&#x89;",
507    "output":["ParseError", ["Character", "\u2030"]]},
508    
509    {"description":"surrogate character reference",
510    "input":"&#xD800;",
511    "output":["ParseError", ["Character", "\uFFFD"]]},
512    
513    {"description":"surrogate character references",
514    "input":"&#xD800;&#xDFFF;",
515    "output":["ParseError", ["Character", "\uFFFD"],
516              "ParseError", ["Character", "\uFFFD"]]},
517    
518    {"description":"surrogate character reference",
519    "input":"\uD800&#xDFFF;",
520    "output":["ParseError", ["Character", "\uD800"],
521              "ParseError", ["Character", "\uFFFD"]]},
522    
523    {"description":"surrogate character reference",
524    "input":"&#xD800;\uDFFF",
525    "output":["ParseError", ["Character", "\uFFFD"],
526              "ParseError", ["Character", "\uDFFF"]]},
527    
528    {"description":"surrogate character reference",
529    "input":"&#55296;",
530    "output":["ParseError", ["Character", "\uFFFD"]]},
531    
532    {"description":"surrogate character reference",
533    "input":"&#57343;",
534    "output":["ParseError", ["Character", "\uFFFD"]]},
535    
536    {"description": "U+FDD0 character reference",
537    "input": "&#xfdd0;",
538    "output": ["ParseError", ["Character", "\uFFFD"]]},
539    
540    {"description": "U+FDD0 decimal character reference",
541    "input": "&#64976;",
542    "output": ["ParseError", ["Character", "\uFFFD"]]},
543    
544    {"description": "U+FDDF character reference",
545    "input": "&#xfddf;",
546    "output": ["ParseError", ["Character", "\uFFFD"]]},
547    
548    {"description": "U+FFFE character reference",
549    "input": "&#xfffe;",
550    "output": ["ParseError", ["Character", "\uFFFD"]]},
551    
552    {"description": "U+FFFE decimal character reference",
553    "input": "&#65534;",
554    "output": ["ParseError", ["Character", "\uFFFD"]]},
555    
556    {"description": "U+FFFF character reference",
557    "input": "&#xffff;",
558    "output": ["ParseError", ["Character", "\uFFFD"]]},
559    
560    {"description": "U+FFFF decimal character reference",
561    "input": "&#65535;",
562    "output": ["ParseError", ["Character", "\uFFFD"]]},
563    
564    {"description": "U+1FFFE character reference",
565    "input": "&#x1fffe;",
566    "output": ["ParseError", ["Character", "\uFFFD"]]},
567    
568    {"description": "U+1FFFF character reference",
569    "input": "&#x1ffff;",
570    "output": ["ParseError", ["Character", "\uFFFD"]]},
571    
572    {"description": "U+10FFFE character reference",
573    "input": "&#x10fffe;",
574    "output": ["ParseError", ["Character", "\uFFFD"]]},
575    
576    {"description": "U+10FFFE decimal character reference",
577    "input": "&#1114110;",
578    "output": ["ParseError", ["Character", "\uFFFD"]]},
579    
580    {"description": "U+10FFFF character reference",
581    "input": "&#x10FFFF;",
582    "output": ["ParseError", ["Character", "\uFFFD"]]},
583    
584    {"description": "U+10FFFF decimal character reference",
585    "input": "&#1114111;",
586    "output": ["ParseError", ["Character", "\uFFFD"]]},
587    
588    {"description":"non-Unicode character reference",
589    "input":"&#1114112;",
590    "output":["ParseError", ["Character", "\uFFFD"]]},
591    
592    {"description":"non-Unicode character reference",
593    "input":"&#x110000;",
594    "output":["ParseError", ["Character", "\uFFFD"]]},
595    
596    {"description":"Broken hcro (&#x)",
597    "input":"&#x",
598    "output":["ParseError", ["Character", "&#x"]]},
599    
600    {"description":"Broken hcro (&#X)",
601    "input":"&#X",
602    "output":["ParseError", ["Character", "&#X"]]},
603    
604    {"description":"Broken hcro (&#x;)",
605    "input":"&#x;",
606    "output":["ParseError", ["Character", "&#x;"]]},
607    
608    {"description":"Broken hcro (&#X;)",
609    "input":"&#X;",
610    "output":["ParseError", ["Character", "&#X;"]]},
611    
612    {"description":"Broken hcro (&#xg)",
613    "input":"&#xg",
614    "output":["ParseError", ["Character", "&#xg"]]},
615    
616    {"description":"Broken hcro (&#Xg)",
617    "input":"&#Xg",
618    "output":["ParseError", ["Character", "&#Xg"]]},
619    
620    {"description":"Broken hcro (&#xg;)",
621    "input":"&#xg;",
622    "output":["ParseError", ["Character", "&#xg;"]]},
623    
624    {"description":"Broken hcro (&#Xg;)",
625    "input":"&#Xg;",
626    "output":["ParseError", ["Character", "&#Xg;"]]},
627    
628    {"description":"Broken hcro (&#x!)",
629    "input":"&#x!",
630    "output":["ParseError", ["Character", "&#x!"]]},
631    
632    {"description":"Broken hcro (&#X!)",
633    "input":"&#X!",
634    "output":["ParseError", ["Character", "&#X!"]]},
635    
636  {"description":"NULL character",  {"description":"NULL character",
637  "input":"\u0000",  "input":"\u0000",
638  "output":["ParseError",["Character", "\uFFFD"]]}  "output":["ParseError",["Character", "\uFFFD"]]},
639    
640    {"description":"&TRADE;",
641    "input":"&TRADE;",
642    "output":[["Character", "\u2122"]]},
643    
644    {"description":"&lang;",
645    "input":"&lang;",
646    "output":[["Character", "\u27E8"]]},
647    
648    {"description":"&rang;",
649    "input":"&rang;",
650    "output":[["Character", "\u27E9"]]},
651    
652    {"description":"&amp;;",
653    "input":"&amp;;",
654    "output":[["Character", "&;"]]},
655    
656    {"description":"&HT",
657    "input":"&\u0009",
658    "output":[["Character", "&\u0009"]]},
659    
660    {"description":"&LF",
661    "input":"&\u000A",
662    "output":[["Character", "&\u000A"]]},
663    
664    {"description": "&VT",
665    "input": "&\u000B",
666    "output": ["ParseError", ["Character", "&\u000B"]]},
667    
668    {"description":"&FF",
669    "input":"&\u000C",
670    "output":[["Character", "&\u000C"]]},
671    
672    {"description":"&SP",
673    "input":"& ",
674    "output":[["Character", "& "]]},
675    
676    {"description":"&<",
677    "input":"&<",
678    "output":[["Character", "&"], "ParseError", ["Character", "<"]]},
679    
680    {"description":"&<p>",
681    "input":"&<p>",
682    "output":[["Character", "&"], ["StartTag", "p", {}]]},
683    
684    {"description":"&&",
685    "input":"&&",
686    "output":[["Character", "&&"]]},
687    
688    {"description":"&&amp;",
689    "input":"&&amp;",
690    "output":[["Character", "&&"]]},
691    
692    {"description":"&",
693    "input":"&",
694    "output":[["Character", "&"]]},
695    
696    {"description":"named character reference w/o refc",
697    "input":"&ampabc",
698    "output":["ParseError", ["Character", "&abc"]]},
699    
700    {"description":"named character reference",
701    "input":"&amp;abc",
702    "output":[["Character", "&abc"]]},
703    
704    {"description":"named character reference w/o refc",
705    "input":"&abc",
706    "output":["ParseError", ["Character", "&abc"]]},
707    
708    {"description":"unknown named character reference",
709    "input":"&abc;",
710    "output":["ParseError", ["Character", "&abc;"]]},
711    
712    {"description":"named character reference w/o refc in attr",
713    "input":"<a href='&ampabc'>",
714    "output":["ParseError", ["StartTag", "a", {"href": "&ampabc"}]]},
715    
716    {"description":"named character reference in attr",
717    "input":"<a href='&amp;abc'>",
718    "output":[["StartTag", "a", {"href": "&abc"}]]},
719    
720    {"description":"named character reference w/o refc in attr",
721    "input":"<a href='&abc'>",
722    "output":["ParseError", ["StartTag", "a", {"href": "&abc"}]]},
723    
724    {"description":"unknown named character reference in attr",
725    "input":"<a href='&abc;'>",
726    "output":["ParseError", ["StartTag", "a", {"href": "&abc;"}]]},
727    
728    {"description":"entity w/o refc at the end of unterminated attribute value",
729    "input":"<a href='&COPY",
730    "output":["ParseError", "ParseError", ["StartTag", "a", {"href": "\u00A9"}]]},
731    
732    {"description":"entity w/o refc at the end of attribute value",
733    "input":"<a href='&COPY'>",
734    "output":["ParseError", ["StartTag", "a", {"href": "\u00A9"}]]},
735    
736    {"description":"entity w/refc at the end of attribute value",
737    "input":"<a href='&COPY;'>",
738    "output":[["StartTag", "a", {"href": "\u00A9"}]]},
739    
740    {"description":"entity w/o refc href='&COPY!'",
741    "input":"<a href='&COPY!'>",
742    "output":["ParseError", ["StartTag", "a", {"href": "\u00A9!"}]]},
743    
744    {"description":"entity w/o refc href='&COPY=ok'",
745    "input":"<a href='&COPY=ok'>",
746    "output":["ParseError", ["StartTag", "a", {"href": "\u00A9=ok"}]]},
747    
748    {"description":"entity w/o refc href='&COPYright'",
749    "input":"<a href='&COPYright'>",
750    "output":["ParseError", ["StartTag", "a", {"href": "&COPYright"}]]},
751    
752    {"description":"entity w/o refc href='&COPYright;'",
753    "input":"<a href='&COPYright;'>",
754    "output":["ParseError", ["StartTag", "a", {"href": "&COPYright;"}]]},
755    
756    {"description":"entity w/o refc href='&COPYrightc'",
757    "input":"<a href='&COPYrightc'>",
758    "output":["ParseError", ["StartTag", "a", {"href": "&COPYrightc"}]]},
759    
760    {"description":"entity w/o refc href='&COPYrightcd'",
761    "input":"<a href='&COPYrightcd'>",
762    "output":["ParseError", ["StartTag", "a", {"href": "&COPYrightcd"}]]},
763    
764    {"description":"cdata end tag containing <",
765    "contentModelFlags":["RCDATA","CDATA"],
766    "lastStartTag":"xxx",
767    "input":"</xxx<div>",
768    "output":[["Character", "</xxx<div>"]]},
769    
770    {"description":"cdata end tag containing VT",
771    "contentModelFlags":["RCDATA","CDATA"],
772    "lastStartTag":"xxx",
773    "input":"</xxx\u000Babc",
774    "output":[["Character", "</xxx\u000Babc"]]},
775    
776    {"description":"< in tag name state",
777    "input":"<p<div>",
778    "output":[["StartTag", "p<div", {}]]},
779    
780    {"description":"VT in tag name state",
781    "input":"<p\u000ba>",
782    "output":[["StartTag", "p\u000Ba", {}]]},
783    
784    {"description":"< in before attribute name state",
785    "input":"<p <div>",
786    "output":["ParseError", ["StartTag", "p", {"<div":""}]]},
787    
788    {"description":"VT in before attribute name state",
789    "input":"<p \u000bx>",
790    "output":[["StartTag", "p", {"\u000Bx":""}]]},
791    
792    {"description":"< in attribute name state",
793    "input":"<p align<div>",
794    "output":["ParseError", ["StartTag", "p", {"align<div":""}]]},
795    
796    {"description":"VT in attribute name state",
797    "input":"<p a\u000bc>",
798    "output":[["StartTag", "p", {"a\u000bc":""}]]},
799    
800    {"description":"< in after attribute name state",
801    "input":"<p align <div>",
802    "output":["ParseError", ["StartTag", "p", {"align":"","<div":""}]]},
803    
804    {"description":"VT in after attribute name state",
805    "input":"<p a \u000bb>",
806    "output":[["StartTag", "p", {"a":"","\u000bb":""}]]},
807    
808    {"description":"< in before attribute value state",
809    "input":"<p align=<div>",
810    "output":["ParseError", ["StartTag", "p", {"align":"<div"}]]},
811    
812    {"description":"VT in before attribute value state",
813    "input":"<p a=\u000bc>",
814    "output":[["StartTag", "p", {"a":"\u000bc"}]]},
815    
816    {"description":"< in attribute value (unquoted) state",
817    "input":"<p align=left<div>",
818    "output":["ParseError", ["StartTag", "p", {"align":"left<div"}]]},
819    
820    {"description":"VT in attribute value (unquoted) state",
821    "input":"<p align=left\u000bc>",
822    "output":[["StartTag", "p", {"align":"left\u000bc"}]]},
823    
824    {"description":"< in attribute value (single-unquoted) state",
825    "input":"<p align='left<div>",
826    "output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]},
827    
828    {"description":"< in attribute value (double-unquoted) state",
829    "input":"<p align=\u0022left<div>",
830    "output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]},
831    
832    {"description": "< in after attribute value (quoted) state",
833    "input": "<p a=\"b\"\u000bc>",
834    "output": ["ParseError", ["StartTag", "p", {"a":"b", "\u000bc": ""}]]},
835    
836    {"description":"/''b=\"\"",
837    "input": "<a /''b=\"\">",
838    "output": ["ParseError", "ParseError", "ParseError",
839        ["StartTag", "a", {"''b": ""}]]},
840    
841    {"description":"/\"\"b=\"\"",
842    "input": "<a /\"\"b=\"\">",
843    "output": ["ParseError", "ParseError", "ParseError",
844        ["StartTag", "a", {"\"\"b": ""}]]},
845    
846    {"description":"\"b=\"\"",
847    "input": "<a \"b=\"\">",
848    "output": ["ParseError", ["StartTag", "a", {"\"b": ""}]]},
849    
850    {"description":"\"\"b=\"\"",
851    "input": "<a \"\"b=\"\">",
852    "output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"b": ""}]]},
853    
854    {"description":"'b=\"\"",
855    "input": "<a 'b=\"\">",
856    "output": ["ParseError", ["StartTag", "a", {"'b": ""}]]},
857    
858    {"description":"''b=\"\"",
859    "input": "<a ''b=\"\">",
860    "output": ["ParseError", "ParseError", ["StartTag", "a", {"''b": ""}]]},
861    
862    {"description":"/b=\"\"",
863    "input": "<a /b=\"\">",
864    "output": ["ParseError", ["StartTag", "a", {"b": ""}]]},
865    
866    {"description":"b/=\"\"",
867    "input": "<a b/=\"\">",
868    "output": ["ParseError", "ParseError", "ParseError", "ParseError",
869        ["StartTag", "a", {"b": "", "=\"\"": ""}]]},
870    
871    {"description":"b/c=\"\"",
872    "input": "<a b/c=\"\">",
873    "output": ["ParseError", ["StartTag", "a", {"b": "", "c": ""}]]},
874    
875    {"description":"bc[NULL]=\"\"",
876    "input": "<a bc\u0000=\"\">",
877    "output": ["ParseError", ["StartTag", "a", {"bc\uFFFD": ""}]]},
878    
879    {"description":"b[NULL]c=\"\"",
880    "input": "<a b\u0000c=\"\">",
881    "output": ["ParseError", ["StartTag", "a", {"b\uFFFDc": ""}]]},
882    
883    {"description":"[NULL]bc=\"\"",
884    "input": "<a \u0000bc=\"\">",
885    "output": ["ParseError", ["StartTag", "a", {"\uFFFDbc": ""}]]},
886    
887    {"description": "<span ===>",
888    "input": "<span ===>",
889    "output": ["ParseError", "ParseError", ["StartTag", "span", {"=": "="}]]},
890    
891    {"description": "<span a==>",
892    "input": "<span a==>",
893    "output": ["ParseError", ["StartTag", "span", {"a": "="}]]},
894    
895    {"description": "<span ==a>",
896    "input": "<span ==a>",
897    "output": ["ParseError", ["StartTag", "span", {"=": "a"}]]},
898    
899    {"description": "<span a=b=>",
900    "input": "<span a=b=>",
901    "output": ["ParseError", ["StartTag", "span", {"a": "b="}]]},
902    
903    {"description": "<span a=<> (HTML5 revision 3206)",
904    "input": "<span a=<>",
905    "output": ["ParseError", ["StartTag", "span", {"a": "<"}]]},
906    
907    {"description": "<span a=b<> (HTML5 revision 3206)",
908    "input": "<span a=b<>",
909    "output": ["ParseError", ["StartTag", "span", {"a": "b<"}]]},
910    
911    {"description": "<span =x\"=\"x>",
912    "input": "<span =x\"=\"x>",
913    "output": ["ParseError", "ParseError", "ParseError",
914        ["StartTag", "span", {"=x\"": "x>"}]]},
915    
916    {"description": "<span =x\"=\"x\">",
917    "input": "<span =x\"=\"x\">",
918    "output": ["ParseError", "ParseError", ["StartTag", "span", {"=x\"": "x"}]]},
919    
920    {"description": "bad attribute name (HTML5 revision 2123), '",
921    "input": "<foo bar '>",
922    "output": ["ParseError", ["StartTag", "foo", {"bar": "", "'": ""}]]},
923    
924    {"description": "bad attribute name (HTML5 revision 2123), \"",
925    "input": "<foo bar \">",
926    "output": ["ParseError", ["StartTag", "foo", {"bar": "", "\"": ""}]]},
927    
928    {"description": "bad attribute name (HTML5 revision 2123), 'x",
929    "input": "<foo bar 'x>",
930    "output": ["ParseError", ["StartTag", "foo", {"bar": "", "'x": ""}]]},
931    
932    {"description": "bad attribute name (HTML5 revision 2123), \"x",
933    "input": "<foo bar \"x>",
934    "output": ["ParseError", ["StartTag", "foo", {"bar": "", "\"x": ""}]]},
935    
936    {"description": "empty unquoted attribute value (HTML5 revision 2122)",
937    "input": "<foo bar=>",
938    "output": ["ParseError", ["StartTag", "foo", {"bar": ""}]]},
939    
940    {"description": "empty unquoted attribute value (HTML5 revision 2122)",
941    "input": "</foo bar=>",
942    "output": ["ParseError", "ParseError", ["EndTag", "foo"]]},
943    
944    {"description": "empty unquoted attribute value followed by another attr",
945    "input": "<foo bar= baz=>",
946    "output": ["ParseError", ["StartTag", "foo", {"bar": "baz="}]]},
947    
948    {"description":"&\"",
949    "input": "&\"",
950    "output": ["ParseError", ["Character", "&\""]]},
951    
952    {"description":"&'",
953    "input": "&'",
954    "output": ["ParseError", ["Character", "&'"]]},
955    
956    {"description":"<a href=\"&\">",
957    "input": "<a href=\"&\">",
958    "output": [["StartTag", "a", {"href": "&"}]]},
959    
960    {"description":"<a href=\"&'\">",
961    "input": "<a href=\"&'\">",
962    "output": ["ParseError", ["StartTag", "a", {"href": "&'"}]]},
963    
964    {"description":"<a href='&'>",
965    "input": "<a href='&'>",
966    "output": [["StartTag", "a", {"href": "&"}]]},
967    
968    {"description":"<a href='&\"'>",
969    "input": "<a href='&\"'>",
970    "output": ["ParseError", ["StartTag", "a", {"href": "&\""}]]},
971    
972    {"description":"<a href=&\">",
973    "input": "<a href=&\">",
974    "output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&\""}]]},
975    
976    {"description":"<a href=&'>",
977    "input": "<a href=&'>",
978    "output": ["ParseError", "ParseError", ["StartTag", "a", {"href": "&'"}]]},
979    
980    {"description": "<!->-->",
981    "input": "<!->-->",
982    "output": ["ParseError", ["Comment", "-"], ["Character", "-->"]]},
983    
984    {"description": "<!!--->-->",
985    "input": "<!!--->-->",
986    "output": ["ParseError", ["Comment", "!---"], ["Character", "-->"]]},
987    
988    {"description": "<!----!>",
989    "input": "<!----!>",
990    "output": ["ParseError", ["Comment", ""]]},
991    
992    {"description": "<!--a--!>",
993    "input": "<!--a--!>",
994    "output": ["ParseError", ["Comment", "a"]]},
995    
996    {"description": "<!----!-->",
997    "input": "<!----!-->",
998    "output": ["ParseError", ["Comment", "--!"]]},
999    
1000    {"description": "<!--a--!-->",
1001    "input": "<!--a--!-->",
1002    "output": ["ParseError", ["Comment", "a--!"]]},
1003    
1004    {"description": "<!----!",
1005    "input": "<!----!",
1006    "output": ["ParseError", "ParseError", ["Comment", ""]]},
1007    
1008    {"description": "<!----!x-->",
1009    "input": "<!----!x-->",
1010    "output": ["ParseError", ["Comment", "--!x"]]},
1011    
1012    {"description": "<!---- >",
1013    "input": "<!---- >",
1014    "output": ["ParseError", ["Comment", "-- "]]},
1015    
1016    {"description": "<!--a-- >",
1017    "input": "<!--a-- >",
1018    "output": ["ParseError", ["Comment", "a-- "]]},
1019    
1020    {"description": "<!--a--\u000A>",
1021    "input": "<!--a--\u000A>",
1022    "output": ["ParseError", ["Comment", "a--\u000A"]]},
1023    
1024    {"description": "<!--a-- a>",
1025    "input": "<!--a-- a>",
1026    "output": ["ParseError", "ParseError", ["Comment", "a-- a>"]]},
1027    
1028    {"description": "<!--a-- ->",
1029    "input": "<!--a-- ->",
1030    "output": ["ParseError", "ParseError", ["Comment", "a-- ->"]]},
1031    
1032    {"description": "<!--a-- -->",
1033    "input": "<!--a-- -->",
1034    "output": ["ParseError", "ParseError", ["Comment", "a-- -->"]]},
1035    
1036    {"description": "<!--a-- ",
1037    "input": "<!--a-- ",
1038    "output": ["ParseError", "ParseError", ["Comment", "a-- "]]},
1039    
1040    {"description": "<!--a-- --b-- >",
1041    "input": "<!--a-- --b-- >",
1042    "output": ["ParseError", "ParseError", ["Comment", "a-- --b-- "]]},
1043    
1044    {"description": "<a href=''rel=''>",
1045    "input": "<a href=''rel=''>",
1046    "output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]},
1047    
1048    {"description": "<a href=\"\"rel=''>",
1049    "input": "<a href=\"\"rel=''>",
1050    "output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]},
1051    
1052    {"description": "<a href=''/rel=''>",
1053    "input": "<a href=''/rel=''>",
1054    "output": ["ParseError", ["StartTag", "a", {"href": "", "rel": ""}]]},
1055    
1056    {"description": "<a href=''rel=''/>",
1057    "input": "<a href=''rel=''/>",
1058    "output": ["ParseError",
1059        ["StartTag", "a", {"href": "", "rel": ""}, true]]},
1060    
1061    {"description": "<link href=''rel=''/>",
1062    "input": "<link href=''rel=''/>",
1063    "output": ["ParseError", ["StartTag", "link", {"href": "", "rel": ""}, true]]},
1064    
1065    {"description": "permitted slash after a space",
1066    "input": "<br />",
1067    "output": [["StartTag", "br", {}, true]]},
1068    
1069    {"description": "slash in tag after a space",
1070    "input": "<br / >",
1071    "output": ["ParseError", ["StartTag", "br", {}]]},
1072    
1073    {"description": "non-permitted slash after a space",
1074    "input": "<b />",
1075    "output": [["StartTag", "b", {}, true]]},
1076    
1077    {"description": "end tag (non-)permitted slash after a space",
1078    "input": "</br />",
1079    "output": ["ParseError", ["EndTag", "br"]]},
1080    
1081    {"description": "permitted slash after attribute name",
1082    "input": "<br class/>",
1083    "output": [["StartTag", "br", {"class": ""}, true]]},
1084    
1085    {"description": "slash in tag after attribute name",
1086    "input": "<br class/ >",
1087    "output": ["ParseError", ["StartTag", "br", {"class": ""}]]},
1088    
1089    {"description": "non permitted slash after attribute name",
1090    "input": "<b class/>",
1091    "output": [["StartTag", "b", {"class": ""}, true]]},
1092    
1093    {"description": "end tag (non-)permitted slash after attribute name",
1094    "input": "</br class/>",
1095    "output": ["ParseError", "ParseError", ["EndTag", "br"]]},
1096    
1097    {"description": "permitted slash in after attribute name state",
1098    "input": "<br class />",
1099    "output": [["StartTag", "br", {"class": ""}, true]]},
1100    
1101    {"description": "non permitted slash in after attribute name state",
1102    "input": "<b class />",
1103    "output": [["StartTag", "b", {"class": ""}, true]]},
1104    
1105    {"description": "end tag (non-)permitted slash in after attribute name state",
1106    "input": "</br class />",
1107    "output": ["ParseError", "ParseError", ["EndTag", "br"]]},
1108    
1109    {"description": "<a \">",
1110    "input": "<a \">",
1111    "output": ["ParseError", ["StartTag", "a", {"\"": ""}]]},
1112    
1113    {"description": "<a \"\">",
1114    "input": "<a \"\">",
1115    "output": ["ParseError", "ParseError", ["StartTag", "a", {"\"\"": ""}]]},
1116    
1117    {"description": "<a '>",
1118    "input": "<a '>",
1119    "output": ["ParseError", ["StartTag", "a", {"'": ""}]]},
1120    
1121    {"description": "<a ''>",
1122    "input": "<a ''>",
1123    "output": ["ParseError", "ParseError", ["StartTag", "a", {"''": ""}]]},
1124    
1125    {"description": "<a a\">",
1126    "input": "<a a\">",
1127    "output": ["ParseError", ["StartTag", "a", {"a\"": ""}]]},
1128    
1129    {"description": "<a a'>",
1130    "input": "<a a'>",
1131    "output": ["ParseError", ["StartTag", "a", {"a'": ""}]]},
1132    
1133    {"description": "<a a\"'>",
1134    "input": "<a a\"'>",
1135    "output": ["ParseError", "ParseError", ["StartTag", "a", {"a\"'": ""}]]},
1136    
1137    {"description": "<a a=\">",
1138    "input": "<a a=\">",
1139    "output": ["ParseError", ["StartTag", "a", {"a": ">"}]]},
1140    
1141    {"description": "<a a='>",
1142    "input": "<a a='>",
1143    "output": ["ParseError", ["StartTag", "a", {"a": ">"}]]},
1144    
1145    {"description": "<a a=a\">",
1146    "input": "<a a=a\">",
1147    "output": ["ParseError", ["StartTag", "a", {"a": "a\""}]]},
1148    
1149    {"description": "<a a=a'>",
1150    "input": "<a a=a'>",
1151    "output": ["ParseError", ["StartTag", "a", {"a": "a'"}]]},
1152    
1153    {"description": "<a a=>",
1154    "input": "<a a=>",
1155    "output": ["ParseError", ["StartTag", "a", {"a": ""}]]},
1156    
1157    {"description": "end tag attribute (before attribute, >)",
1158    "input": "</p class=\"\"  >",
1159    "output": ["ParseError", ["EndTag", "p"]]},
1160    
1161    {"description": "end tag attribute (before attribute, EOF)",
1162    "input": "</p class=\"\"  ",
1163    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1164    
1165    {"description": "end tag not closed (before attribute)",
1166    "input": "</p >",
1167    "output": [["EndTag", "p"]]},
1168    
1169    {"description": "end tag not closed (attribute name)",
1170    "input": "</p class",
1171    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1172    
1173    {"description": "end tag attribute (after attribute name)",
1174    "input": "</p class >",
1175    "output": ["ParseError", ["EndTag", "p"]]},
1176    
1177    {"description": "end tag attributes uc (after attribute name)",
1178    "input": "</p class Title>",
1179    "output": ["ParseError", ["EndTag", "p"]]},
1180    
1181    {"description": "end tag attributes lc (after attribute name)",
1182    "input": "</p class title>",
1183    "output": ["ParseError", ["EndTag", "p"]]},
1184    
1185    {"description": "end tag not closed (after attribute name)",
1186    "input": "</p class ",
1187    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1188    
1189    {"description": "end tag attribute (before attribute value)",
1190    "input": "</p class=>",
1191    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1192    
1193    {"description": "end tag not closed (before attribute value)",
1194    "input": "</p class=",
1195    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1196    
1197    {"description": "end tag not closed (attribute value double quote)",
1198    "input": "</p class=\"",
1199    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1200    
1201    {"description": "end tag not closed (attribute value single quote)",
1202    "input": "</p class='",
1203    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1204    
1205    {"description": "end tag attribute (attribute value unquoted)",
1206    "input": "</p class=a>",
1207    "output": ["ParseError", ["EndTag", "p"]]},
1208    
1209    {"description": "end tag not closed (attribute value unquoted)",
1210    "input": "</p class=a",
1211    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1212    
1213    {"description": "end tag attribute (after attribute value double quoted)",
1214    "input": "</p class=\"a\" >",
1215    "output": ["ParseError", ["EndTag", "p"]]},
1216    
1217    {"description": "end tag attribute (after attribute value single quoted)",
1218    "input": "</p class='a' >",
1219    "output": ["ParseError", ["EndTag", "p"]]},
1220    
1221    {"description": "end tag not closed (after attribute value double quoted)",
1222    "input": "</p class=\"a\" ",
1223    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1224    
1225    {"description": "end tag not closed (after attribute value single quoted)",
1226    "input": "</p class='a' ",
1227    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1228    
1229    {"description": "start tag not closed (after attribute value (quoted))",
1230    "input": "<p class='a'",
1231    "output": ["ParseError", ["StartTag", "p", {"class": "a"}]]},
1232    
1233    {"description": "end tag not closed (after attribute value (quoted))",
1234    "input": "</p class='a'",
1235    "output": ["ParseError", "ParseError", ["EndTag", "p"]]},
1236    
1237    {"description": "start tag not closed (self-closing start tag)",
1238    "input": "<p class='a'/",
1239    "output": ["ParseError", ["StartTag", "p", {"class": "a"}]]},
1240    
1241    {"description": "end tag not closed (self-closing start tag)",
1242    "input": "</p/",
1243    "output": ["ParseError", ["EndTag", "p"]]},
1244    
1245    {"description": "end tag not closed (self-closing start tag)",
1246    "input": "</p class='a'/",
1247    "output": ["ParseError", "ParseError", ["EndTag", "p"]]}
1248    
1249    
1250    
1251  ]}  ]}

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.34

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24