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

Diff of /markup/html/whatpm/t/tokenizer/test4.test

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

revision 1.1 by wakaba, Mon Jul 16 07:03:09 2007 UTC revision 1.6 by wakaba, Sat Oct 4 17:16:02 2008 UTC
# Line 8  Line 8 
8  "input":"<z x=<",  "input":"<z x=<",
9  "output":["ParseError", ["StartTag", "z", {"x": "<"}]]},  "output":["ParseError", ["StartTag", "z", {"x": "<"}]]},
10    
11    {"description":"= in unquoted attribute value",
12    "input":"<z z=z=z>",
13    "output":["ParseError", ["StartTag", "z", {"z": "z=z"}]]},
14    
15    {"description":"= attribute",
16    "input":"<z =>",
17    "output":["ParseError", ["StartTag", "z", {"=": ""}]]},
18    
19    {"description":"== attribute",
20    "input":"<z ==>",
21    "output":["ParseError", ["StartTag", "z", {"=": ""}]]},
22    
23    {"description":"=== attribute",
24    "input":"<z ===>",
25    "output":["ParseError", "ParseError", ["StartTag", "z", {"=": "="}]]},
26    
27    {"description":"==== attribute",
28    "input":"<z ====>",
29    "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"=": "=="}]]},
30    
31    {"description":"Allowed \" after ampersand in attribute value",
32    "input":"<z z=\"&\">",
33    "output":[["StartTag", "z", {"z": "&"}]]},
34    
35    {"description":"Non-allowed ' after ampersand in attribute value",
36    "input":"<z z=\"&'\">",
37    "output":["ParseError", ["StartTag", "z", {"z": "&'"}]]},
38    
39    {"description":"Allowed ' after ampersand in attribute value",
40    "input":"<z z='&'>",
41    "output":[["StartTag", "z", {"z": "&"}]]},
42    
43    {"description":"Non-allowed \" after ampersand in attribute value",
44    "input":"<z z='&\"'>",
45    "output":["ParseError", ["StartTag", "z", {"z": "&\""}]]},
46    
47    {"description":"Text after bogus character reference",
48    "input":"<z z='&xlink_xmlns;'>bar<z>",
49    "output":["ParseError",["StartTag","z",{"z":"&xlink_xmlns;"}],["Character","bar"],["StartTag","z",{}]]},
50    
51    {"description":"Text after hex character reference",
52    "input":"<z z='&#x0020; foo'>bar<z>",
53    "output":[["StartTag","z",{"z":"  foo"}],["Character","bar"],["StartTag","z",{}]]},
54    
55    {"description":"Attribute name starting with \"",
56    "input":"<foo \"='bar'>",
57    "output":["ParseError", ["StartTag", "foo", {"\"": "bar"}]]},
58    
59    {"description":"Attribute name starting with '",
60    "input":"<foo '='bar'>",
61    "output":["ParseError", ["StartTag", "foo", {"'": "bar"}]]},
62    
63    {"description":"Attribute name containing \"",
64    "input":"<foo a\"b='bar'>",
65    "output":["ParseError", ["StartTag", "foo", {"a\"b": "bar"}]]},
66    
67    {"description":"Attribute name containing '",
68    "input":"<foo a'b='bar'>",
69    "output":["ParseError", ["StartTag", "foo", {"a'b": "bar"}]]},
70    
71    {"description":"Unquoted attribute value containing '",
72    "input":"<foo a=b'c>",
73    "output":["ParseError", ["StartTag", "foo", {"a": "b'c"}]]},
74    
75    {"description":"Unquoted attribute value containing \"",
76    "input":"<foo a=b\"c>",
77    "output":["ParseError", ["StartTag", "foo", {"a": "b\"c"}]]},
78    
79    {"description":"Double-quoted attribute value not followed by whitespace",
80    "input":"<foo a=\"b\"c>",
81    "output":["ParseError", ["StartTag", "foo", {"a": "b", "c": ""}]]},
82    
83    {"description":"Single-quoted attribute value not followed by whitespace",
84    "input":"<foo a='b'c>",
85    "output":["ParseError", ["StartTag", "foo", {"a": "b", "c": ""}]]},
86    
87    {"description":"Quoted attribute followed by permitted /",
88    "input":"<br a='b'/>",
89    "output":[["StartTag","br",{"a":"b"},true]]},
90    
91    {"description":"Quoted attribute followed by non-permitted /",
92    "input":"<bar a='b'/>",
93    "output":[["StartTag","bar",{"a":"b"},true]]},
94    
95  {"description":"CR EOF after doctype name",  {"description":"CR EOF after doctype name",
96  "input":"<!doctype html \r",  "input":"<!doctype html \r",
97  "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},  "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
# Line 46  Line 130 
130    
131  {"description":"Maximum non-BMP numeric entity",  {"description":"Maximum non-BMP numeric entity",
132  "input":"&#X10FFFF;",  "input":"&#X10FFFF;",
133  "output":[["Character", "\uDBFF\uDFFF"]]},  "output":["ParseError", ["Character", "\uFFFD"]]},
134    
135  {"description":"Above maximum numeric entity",  {"description":"Above maximum numeric entity",
136  "input":"&#x110000;",  "input":"&#x110000;",
# Line 106  Line 190 
190    
191  {"description":"Permitted slash",  {"description":"Permitted slash",
192  "input":"<br/>",  "input":"<br/>",
193  "output":[["StartTag", "br", {}]]},  "output":[["StartTag","br",{},true]]},
194    
195  {"description":"Non-permitted slash",  {"description":"Non-permitted slash",
196  "input":"<xr/>",  "input":"<xr/>",
197  "output":["ParseError", ["StartTag", "xr", {}]]},  "output":[["StartTag","xr",{},true]]},
198    
199  {"description":"Permitted slash but in close tag",  {"description":"Permitted slash but in close tag",
200  "input":"</br/>",  "input":"</br/>",
# Line 142  Line 226 
226  "output":["ParseError", "ParseError", ["Comment", "doc\uFFFD"]],  "output":["ParseError", "ParseError", ["Comment", "doc\uFFFD"]],
227  "ignoreErrorOrder":true},  "ignoreErrorOrder":true},
228    
229    {"description":"U+0080 in lookahead region",
230    "input":"<!doc\u0080",
231    "output":["ParseError", "ParseError", ["Comment", "doc\u0080"]],
232    "ignoreErrorOrder":true},
233    
234    {"description":"U+FDD1 in lookahead region",
235    "input":"<!doc\uFDD1",
236    "output":["ParseError", "ParseError", ["Comment", "doc\uFDD1"]],
237    "ignoreErrorOrder":true},
238    
239    {"description":"U+1FFFF in lookahead region",
240    "input":"<!doc\uD83F\uDFFF",
241    "output":["ParseError", "ParseError", ["Comment", "doc\uD83F\uDFFF"]],
242    "ignoreErrorOrder":true},
243    
244  {"description":"CR followed by U+0000",  {"description":"CR followed by U+0000",
245  "input":"\r\u0000",  "input":"\r\u0000",
246  "output":["ParseError", ["Character", "\n\uFFFD"]],  "output":["ParseError", ["Character", "\n\uFFFD"]],
# Line 173  Line 272 
272    
273  {"description":"LF CR",  {"description":"LF CR",
274  "input":"\n\r",  "input":"\n\r",
275  "output":[["Character", "\n\n"]]}  "output":[["Character", "\n\n"]]},
276    
277    {"description":"text CR CR CR text",
278    "input":"text\r\r\rtext",
279    "output":[["Character", "text\n\n\ntext"]]},
280    
281    {"description":"Doctype publik",
282    "input":"<!DOCTYPE html PUBLIK \"AbC\" \"XyZ\">",
283    "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
284    
285    {"description":"Doctype publi",
286    "input":"<!DOCTYPE html PUBLI",
287    "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
288    
289    {"description":"Doctype sistem",
290    "input":"<!DOCTYPE html SISTEM \"AbC\">",
291    "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
292    
293    {"description":"Doctype sys",
294    "input":"<!DOCTYPE html SYS",
295    "output":["ParseError", ["DOCTYPE", "html", null, null, false]]}
296    
297  ]}  ]}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24